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
Hide 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 )
sout_stream_id_t
*
id
;
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
)
);
id
->
id
=
NULL
;
...
...
@@ -2129,11 +2134,11 @@ static int transcode_video_process( sout_stream_t *p_stream,
/* Check if we need a filter for chroma conversion or resizing */
if
(
id
->
p_decoder
->
fmt_out
.
video
.
i_chroma
!=
id
->
p_encoder
->
fmt_in
.
video
.
i_chroma
||
(
int
)
id
->
p_decoder
->
fmt_out
.
video
.
i_width
!=
p_sys
->
i_crop_width
||
p_sys
->
i_crop_width
!=
p_sys
->
i_nopadd_width
||
p_sys
->
i_nopadd_width
!=
(
int
)
id
->
p_encoder
->
fmt_out
.
video
.
i_width
||
(
int
)
id
->
p_decoder
->
fmt_out
.
video
.
i_height
!=
p_sys
->
i_crop_height
||
p_sys
->
i_crop_height
!=
p_sys
->
i_nopadd_height
||
p_sys
->
i_nopadd_height
!=
(
int
)
id
->
p_encoder
->
fmt_out
.
video
.
i_height
)
...
...
@@ -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
)
);
if
(
!
p_pic
)
return
NULL
;
p_dec
->
fmt_out
.
video
.
i_chroma
=
p_dec
->
fmt_out
.
i_codec
;
vout_AllocatePicture
(
VLC_OBJECT
(
p_dec
),
p_pic
,
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,
if
(
!
p_pic
->
i_planes
)
{
free
(
p_pic
);
return
0
;
return
NULL
;
}
p_pic
->
pf_release
=
video_release_buffer
;
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
->
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