mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
bugfix: make mad decode the whole stream
Original commit message from CVS: bugfix: make mad decode the whole stream
This commit is contained in:
parent
3a4fdd3927
commit
df0d0d6ba2
2 changed files with 7 additions and 3 deletions
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit c2d7711457d468d527890f2057883c133b50c3b7
|
||||
Subproject commit 42efc7fe3eda3ea184fa620f2e0dbc4977f16c26
|
|
@ -366,8 +366,8 @@ gst_mad_chain (GstPad *pad, GstBuffer *buffer)
|
|||
|
||||
mad_input_buffer = mad->tempbuffer;
|
||||
|
||||
/* it we have enough data we can proceed */
|
||||
while (mad->tempsize >= MAD_BUFFER_MDLEN) {
|
||||
/* if we have data we can try to proceed */
|
||||
while (mad->tempsize >= 0) {
|
||||
gint consumed;
|
||||
guint nchannels, nsamples;
|
||||
mad_fixed_t const *left_ch, *right_ch;
|
||||
|
@ -377,6 +377,10 @@ gst_mad_chain (GstPad *pad, GstBuffer *buffer)
|
|||
mad_stream_buffer (&mad->stream, mad_input_buffer, mad->tempsize);
|
||||
|
||||
if (mad_frame_decode (&mad->frame, &mad->stream) == -1) {
|
||||
/* not enough data, need to wait for next buffer? */
|
||||
if (mad->stream.error == MAD_ERROR_BUFLEN) {
|
||||
break;
|
||||
}
|
||||
if (!MAD_RECOVERABLE (mad->stream.error)) {
|
||||
gst_element_error (GST_ELEMENT (mad), "fatal error decoding stream");
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue