Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
2c32483b
Commit
2c32483b
authored
Aug 05, 2007
by
Rémi Denis-Courmont
Browse files
Fix malloc error handling
(bug reported by David Thiel)
parent
c296e05b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/audio_output/dec.c
View file @
2c32483b
...
...
@@ -280,24 +280,20 @@ aout_buffer_t * aout_DecNewBuffer( aout_instance_t * p_aout,
/* This necessarily allocates in the heap. */
aout_BufferAlloc
(
&
p_input
->
input_alloc
,
duration
,
NULL
,
p_buffer
);
p_buffer
->
i_nb_samples
=
i_nb_samples
;
p_buffer
->
i_nb_bytes
=
i_nb_samples
*
p_input
->
input
.
i_bytes_per_frame
/
p_input
->
input
.
i_frame_length
;
if
(
p_buffer
!=
NULL
)
p_buffer
->
i_nb_bytes
=
i_nb_samples
*
p_input
->
input
.
i_bytes_per_frame
/
p_input
->
input
.
i_frame_length
;
/* Suppose the decoder doesn't have more than one buffered buffer */
p_input
->
b_changed
=
0
;
vlc_mutex_unlock
(
&
p_input
->
lock
);
if
(
p_buffer
==
NULL
)
{
msg_Err
(
p_aout
,
"NULL buffer !"
);
}
else
{
p_buffer
->
start_date
=
p_buffer
->
end_date
=
0
;
}
if
(
p_buffer
==
NULL
)
return
NULL
;
p_buffer
->
i_nb_samples
=
i_nb_samples
;
p_buffer
->
start_date
=
p_buffer
->
end_date
=
0
;
return
p_buffer
;
}
...
...
Write
Preview
Supports
Markdown
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