2004-07-07 Thomas Vander Stichele <thomas (at) apestaart (dot) org>
+ * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_chain):
+ drop incoming buffers that generate decoding errors
+
+2004-07-07 Thomas Vander Stichele <thomas (at) apestaart (dot) org>
+
* ext/ffmpeg/gstffmpeg.c: (gst_ffmpeg_log_callback), (plugin_init):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_chain):
outbuf = gst_buffer_new_and_alloc (AVCODEC_MAX_AUDIO_FRAME_SIZE);
len = avcodec_decode_audio (ffmpegdec->context,
(int16_t *) GST_BUFFER_DATA (outbuf), &have_data, data, size);
- if (have_data < 0)
- GST_WARNING_OBJECT (ffmpegdec, "len %d, have_data: %d < 0 !",
+ if (have_data < 0) {
+ GST_WARNING_OBJECT (ffmpegdec,
+ "FFmpeg error: len %d, have_data: %d < 0 !",
len, have_data);
+ gst_buffer_unref (inbuf);
+ return;
+ }
if (have_data) {
GST_BUFFER_SIZE (outbuf) = have_data;