Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
8546371b
Commit
8546371b
authored
Oct 06, 2005
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
udp: support for RTP"header extension. Patch by Zohar Lorberbaum .
parent
9b17f037
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
modules/access/udp.c
modules/access/udp.c
+12
-6
No files found.
modules/access/udp.c
View file @
8546371b
...
...
@@ -328,6 +328,8 @@ static block_t *BlockParseRTP( access_t *p_access, block_t *p_block )
int
i_payload_type
;
int
i_skip
=
0
;
int
i_sequence_number
=
0
;
int
i_extention_flag
;
int
i_extention_length
=
0
;
if
(
p_block
==
NULL
)
return
NULL
;
...
...
@@ -337,10 +339,11 @@ static block_t *BlockParseRTP( access_t *p_access, block_t *p_block )
/* Parse the header and make some verifications.
* See RFC 1889 & RFC 2250. */
i_rtp_version
=
(
p_block
->
p_buffer
[
0
]
&
0xC0
)
>>
6
;
i_CSRC_count
=
(
p_block
->
p_buffer
[
0
]
&
0x0F
);
i_payload_type
=
(
p_block
->
p_buffer
[
1
]
&
0x7F
);
i_sequence_number
=
(
(
p_block
->
p_buffer
[
2
]
<<
8
)
+
p_block
->
p_buffer
[
3
]
);
i_rtp_version
=
(
p_block
->
p_buffer
[
0
]
&
0xC0
)
>>
6
;
i_CSRC_count
=
p_block
->
p_buffer
[
0
]
&
0x0F
;
i_extention_flag
=
p_block
->
p_buffer
[
0
]
&
0x10
;
i_payload_type
=
p_block
->
p_buffer
[
1
]
&
0x7F
;
i_sequence_number
=
(
p_block
->
p_buffer
[
2
]
<<
8
)
+
p_block
->
p_buffer
[
3
];
if
(
i_rtp_version
!=
2
)
msg_Dbg
(
p_access
,
"RTP version is %u, should be 2"
,
i_rtp_version
);
...
...
@@ -349,10 +352,13 @@ static block_t *BlockParseRTP( access_t *p_access, block_t *p_block )
i_skip
=
4
;
else
if
(
i_payload_type
!=
33
&&
i_payload_type
!=
32
)
msg_Dbg
(
p_access
,
"unsupported RTP payload type (%u)"
,
i_payload_type
);
if
(
i_extention_flag
)
i_extention_length
=
4
+
4
*
(
(
p_block
->
p_buffer
[
14
]
<<
8
)
+
p_block
->
p_buffer
[
15
]
);
i_skip
+=
RTP_HEADER_LEN
+
4
*
i_CSRC_count
;
/* Skip header + CSRC extension field n*(32 bits) + extention */
i_skip
+=
RTP_HEADER_LEN
+
4
*
i_CSRC_count
+
i_extention_length
;
/* A CSRC extension field is 32 bits in size (4 bytes) */
if
(
i_skip
>=
p_block
->
i_buffer
)
goto
trash
;
...
...
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