Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
fcf580b6
Commit
fcf580b6
authored
Feb 01, 2011
by
Pierre Ynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtp sout: fix unsafe read
parent
a685831d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
modules/stream_out/rtp.c
modules/stream_out/rtp.c
+8
-3
No files found.
modules/stream_out/rtp.c
View file @
fcf580b6
...
@@ -344,6 +344,7 @@ struct sout_stream_id_t
...
@@ -344,6 +344,7 @@ struct sout_stream_id_t
sout_stream_t
*
p_stream
;
sout_stream_t
*
p_stream
;
/* rtp field */
/* rtp field */
uint16_t
i_sequence
;
uint16_t
i_sequence
;
bool
b_first_packet
;
bool
b_ts_init
;
bool
b_ts_init
;
uint32_t
i_ts_offset
;
uint32_t
i_ts_offset
;
uint8_t
ssrc
[
4
];
uint8_t
ssrc
[
4
];
...
@@ -948,6 +949,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
...
@@ -948,6 +949,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
id
->
p_fifo
=
NULL
;
id
->
p_fifo
=
NULL
;
id
->
listen
.
fd
=
NULL
;
id
->
listen
.
fd
=
NULL
;
id
->
b_first_packet
=
true
;
id
->
i_caching
=
id
->
i_caching
=
(
int64_t
)
1000
*
var_GetInteger
(
p_stream
,
SOUT_CFG_PREFIX
"caching"
);
(
int64_t
)
1000
*
var_GetInteger
(
p_stream
,
SOUT_CFG_PREFIX
"caching"
);
...
@@ -1239,11 +1241,14 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_t *id,
...
@@ -1239,11 +1241,14 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_t *id,
/* Send a Vorbis/Theora Packed Configuration packet (RFC 5215 §3.1)
/* Send a Vorbis/Theora Packed Configuration packet (RFC 5215 §3.1)
* as the first packet of the stream */
* as the first packet of the stream */
if
(
id
->
i_sequence
==
id
->
i_seq_sent_next
if
(
id
->
b_first_packet
)
&&
(
!
strcmp
(
id
->
rtp_fmt
.
ptname
,
"vorbis"
)
{
||
!
strcmp
(
id
->
rtp_fmt
.
ptname
,
"theora"
)))
id
->
b_first_packet
=
false
;
if
(
!
strcmp
(
id
->
rtp_fmt
.
ptname
,
"vorbis"
)
||
!
strcmp
(
id
->
rtp_fmt
.
ptname
,
"theora"
))
rtp_packetize_xiph_config
(
id
,
id
->
rtp_fmt
.
fmtp
,
rtp_packetize_xiph_config
(
id
,
id
->
rtp_fmt
.
fmtp
,
p_buffer
->
i_pts
);
p_buffer
->
i_pts
);
}
if
(
id
->
rtp_fmt
.
pf_packetize
(
id
,
p_buffer
)
)
if
(
id
->
rtp_fmt
.
pf_packetize
(
id
,
p_buffer
)
)
break
;
break
;
...
...
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