mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
mad: just flush data when seeing BADDATAPTR instead of going into error state
This commit is contained in:
parent
c42e090acc
commit
a2b0e47739
1 changed files with 4 additions and 0 deletions
|
@ -1392,6 +1392,7 @@ gst_mad_chain (GstPad * pad, GstBuffer * buffer)
|
|||
}
|
||||
}
|
||||
|
||||
GST_LOG ("sample rate %d", mad->frame.header.samplerate);
|
||||
GST_LOG ("decoding one frame now");
|
||||
|
||||
if (mad_frame_decode (&mad->frame, &mad->stream) == -1) {
|
||||
|
@ -1408,6 +1409,9 @@ gst_mad_chain (GstPad * pad, GstBuffer * buffer)
|
|||
GST_LOG ("sync error, flushing unneeded data");
|
||||
goto next_no_samples;
|
||||
}
|
||||
} else if (mad->stream.error == MAD_ERROR_BADDATAPTR) {
|
||||
/* Flush data */
|
||||
goto next_no_samples;
|
||||
}
|
||||
/* we are in an error state */
|
||||
mad->in_error = TRUE;
|
||||
|
|
Loading…
Reference in a new issue