Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
15b6bc54
Commit
15b6bc54
authored
Feb 07, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RTP out: use clz
parent
3c6a0755
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
modules/stream_out/rtp.c
modules/stream_out/rtp.c
+5
-7
No files found.
modules/stream_out/rtp.c
View file @
15b6bc54
...
...
@@ -473,7 +473,7 @@ static int Open( vlc_object_t *p_this )
p_sys
->
i_npt_zero
=
VLC_TS_INVALID
;
p_sys
->
i_pts_zero
=
mdate
();
/* arbitrary value, could probably be
* random */
p_sys
->
payload_bitmap
=
0
;
p_sys
->
payload_bitmap
=
0
xFFFFFFFF
;
p_sys
->
i_es
=
0
;
p_sys
->
es
=
NULL
;
p_sys
->
rtsp
=
NULL
;
...
...
@@ -908,7 +908,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
sout_stream_id_t
*
id
;
char
*
psz_sdp
;
if
(
0
xffffffff
==
p_sys
->
payload_bitmap
)
if
(
0
==
p_sys
->
payload_bitmap
)
{
msg_Err
(
p_stream
,
"too many RTP elementary streams"
);
return
NULL
;
...
...
@@ -952,9 +952,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
id
->
p_stream
=
p_stream
;
/* Look for free dymanic payload type */
id
->
i_payload_type
=
96
;
while
(
p_sys
->
payload_bitmap
&
(
1
<<
(
id
->
i_payload_type
-
96
)))
id
->
i_payload_type
++
;
id
->
i_payload_type
=
96
+
clz32
(
p_sys
->
payload_bitmap
);
assert
(
id
->
i_payload_type
<
128
);
vlc_rand_bytes
(
&
id
->
i_sequence
,
sizeof
(
id
->
i_sequence
));
...
...
@@ -1325,7 +1323,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
}
if
(
id
->
i_payload_type
>=
96
)
/* Mark dynamic payload type in use */
p_sys
->
payload_bitmap
|=
1
<<
(
id
->
i_payload_type
-
96
);
p_sys
->
payload_bitmap
&=
~
(
1
<<
(
127
-
id
->
i_payload_type
)
);
#if 0 /* No payload formats sets this at the moment */
int cscov = -1;
...
...
@@ -1394,7 +1392,7 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_t *id )
/* Release dynamic payload type */
if
(
id
->
i_payload_type
>=
96
)
p_sys
->
payload_bitmap
&=
~
(
1
<<
(
id
->
i_payload_type
-
96
)
);
p_sys
->
payload_bitmap
|=
1
<<
(
127
-
id
->
i_payload_type
);
free
(
id
->
psz_fmtp
);
...
...
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