From a2b0e47739294280af89c6e21f59c41cfe2554c7 Mon Sep 17 00:00:00 2001 From: Zaheer Merali Date: Thu, 19 Feb 2009 19:08:10 +0000 Subject: [PATCH] mad: just flush data when seeing BADDATAPTR instead of going into error state --- ext/mad/gstmad.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/mad/gstmad.c b/ext/mad/gstmad.c index 59a6f26257..0b78475d12 100644 --- a/ext/mad/gstmad.c +++ b/ext/mad/gstmad.c @@ -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;