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
d306828b
Commit
d306828b
authored
Feb 08, 2008
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check malloc return value
parent
dab05ad9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
modules/demux/live555.cpp
modules/demux/live555.cpp
+6
-2
No files found.
modules/demux/live555.cpp
View file @
d306828b
...
@@ -308,11 +308,13 @@ static int Open ( vlc_object_t *p_this )
...
@@ -308,11 +308,13 @@ static int Open ( vlc_object_t *p_this )
int
i_read
=
stream_Read
(
p_demux
->
s
,
&
p_sdp
[
i_sdp
],
int
i_read
=
stream_Read
(
p_demux
->
s
,
&
p_sdp
[
i_sdp
],
i_sdp_max
-
i_sdp
-
1
);
i_sdp_max
-
i_sdp
-
1
);
if
(
p_demux
->
b_die
||
p_demux
->
b_error
)
goto
error
;
if
(
i_read
<
0
)
if
(
i_read
<
0
)
{
{
msg_Err
(
p_demux
,
"failed to read SDP"
);
msg_Err
(
p_demux
,
"failed to read SDP"
);
free
(
p_sys
);
goto
error
;
return
VLC_EGENERIC
;
}
}
i_sdp
+=
i_read
;
i_sdp
+=
i_read
;
...
@@ -699,6 +701,7 @@ static int SessionsSetup( demux_t *p_demux )
...
@@ -699,6 +701,7 @@ static int SessionsSetup( demux_t *p_demux )
}
}
tk
=
(
live_track_t
*
)
malloc
(
sizeof
(
live_track_t
)
);
tk
=
(
live_track_t
*
)
malloc
(
sizeof
(
live_track_t
)
);
if
(
!
tk
)
return
VLC_ENOMEM
;
tk
->
p_demux
=
p_demux
;
tk
->
p_demux
=
p_demux
;
tk
->
sub
=
sub
;
tk
->
sub
=
sub
;
tk
->
p_es
=
NULL
;
tk
->
p_es
=
NULL
;
...
@@ -711,6 +714,7 @@ static int SessionsSetup( demux_t *p_demux )
...
@@ -711,6 +714,7 @@ static int SessionsSetup( demux_t *p_demux )
tk
->
i_pts
=
0
;
tk
->
i_pts
=
0
;
tk
->
i_buffer
=
65536
;
tk
->
i_buffer
=
65536
;
tk
->
p_buffer
=
(
uint8_t
*
)
malloc
(
65536
);
tk
->
p_buffer
=
(
uint8_t
*
)
malloc
(
65536
);
if
(
!
tk
->
p_buffer
)
return
VLC_ENOMEM
;
/* Value taken from mplayer */
/* Value taken from mplayer */
if
(
!
strcmp
(
sub
->
mediumName
(),
"audio"
)
)
if
(
!
strcmp
(
sub
->
mediumName
(),
"audio"
)
)
...
...
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