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
2f2c70a8
Commit
2f2c70a8
authored
Sep 03, 2007
by
Jean-Paul Saman
Committed by
Jean-Paul Saman
Mar 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check malloc return values.
parent
c245c80a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
modules/stream_out/transcode.c
modules/stream_out/transcode.c
+14
-3
No files found.
modules/stream_out/transcode.c
View file @
2f2c70a8
...
@@ -858,6 +858,11 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
...
@@ -858,6 +858,11 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
sout_stream_id_t
*
id
;
sout_stream_id_t
*
id
;
id
=
malloc
(
sizeof
(
sout_stream_id_t
)
);
id
=
malloc
(
sizeof
(
sout_stream_id_t
)
);
if
(
!
id
)
{
msg_Err
(
p_stream
,
"out of memory"
);
goto
error
;
}
memset
(
id
,
0
,
sizeof
(
sout_stream_id_t
)
);
memset
(
id
,
0
,
sizeof
(
sout_stream_id_t
)
);
id
->
id
=
NULL
;
id
->
id
=
NULL
;
...
@@ -2482,6 +2487,7 @@ static picture_t *video_new_buffer( vlc_object_t *p_this, picture_t **pp_ring,
...
@@ -2482,6 +2487,7 @@ static picture_t *video_new_buffer( vlc_object_t *p_this, picture_t **pp_ring,
}
}
p_pic
=
malloc
(
sizeof
(
picture_t
)
);
p_pic
=
malloc
(
sizeof
(
picture_t
)
);
if
(
!
p_pic
)
return
NULL
;
p_dec
->
fmt_out
.
video
.
i_chroma
=
p_dec
->
fmt_out
.
i_codec
;
p_dec
->
fmt_out
.
video
.
i_chroma
=
p_dec
->
fmt_out
.
i_codec
;
vout_AllocatePicture
(
VLC_OBJECT
(
p_dec
),
p_pic
,
vout_AllocatePicture
(
VLC_OBJECT
(
p_dec
),
p_pic
,
p_dec
->
fmt_out
.
video
.
i_chroma
,
p_dec
->
fmt_out
.
video
.
i_chroma
,
...
@@ -2492,11 +2498,16 @@ static picture_t *video_new_buffer( vlc_object_t *p_this, picture_t **pp_ring,
...
@@ -2492,11 +2498,16 @@ static picture_t *video_new_buffer( vlc_object_t *p_this, picture_t **pp_ring,
if
(
!
p_pic
->
i_planes
)
if
(
!
p_pic
->
i_planes
)
{
{
free
(
p_pic
);
free
(
p_pic
);
return
0
;
return
NULL
;
}
}
p_pic
->
pf_release
=
video_release_buffer
;
p_pic
->
pf_release
=
video_release_buffer
;
p_pic
->
p_sys
=
malloc
(
sizeof
(
picture_sys_t
)
);
p_pic
->
p_sys
=
malloc
(
sizeof
(
picture_sys_t
)
);
if
(
!
p_pic
->
p_sys
)
{
free
(
p_pic
);
return
NULL
;
}
p_pic
->
p_sys
->
p_owner
=
p_this
;
p_pic
->
p_sys
->
p_owner
=
p_this
;
p_pic
->
i_status
=
RESERVED_PICTURE
;
p_pic
->
i_status
=
RESERVED_PICTURE
;
...
...
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