Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
7c1e2e64
Commit
7c1e2e64
authored
Feb 26, 2015
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtpenc_xiph: Use AV_WB16 instead of manual bitshifts
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
d16c8d28
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
rtpenc_xiph.c
libavformat/rtpenc_xiph.c
+6
-4
No files found.
libavformat/rtpenc_xiph.c
View file @
7c1e2e64
...
...
@@ -19,6 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "rtpenc.h"
...
...
@@ -91,8 +93,8 @@ void ff_rtp_send_xiph(AVFormatContext *s1, const uint8_t *buff, int size)
if
(
s
->
num_frames
>
1
)
q
=
s
->
buf_ptr
;
// jump ahead if needed
*
q
++
=
(
size
>>
8
)
&
0xff
;
*
q
++
=
size
&
0xff
;
AV_WB16
(
q
,
size
)
;
q
+=
2
;
memcpy
(
q
,
buff
,
size
);
q
+=
size
;
s
->
buf_ptr
=
q
;
...
...
@@ -113,8 +115,8 @@ void ff_rtp_send_xiph(AVFormatContext *s1, const uint8_t *buff, int size)
// set packet headers
*
q
++
=
(
frag
<<
6
)
|
(
xdt
<<
4
);
// num_frames = 0
*
q
++
=
(
len
>>
8
)
&
0xff
;
*
q
++
=
len
&
0xff
;
AV_WB16
(
q
,
len
)
;
q
+=
2
;
// set packet body
memcpy
(
q
,
buff
,
len
);
q
+=
len
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment