From 56e2767c204ed85c464da396083d188ebe19ac6b Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Sat, 23 Feb 2013 14:34:35 +0100 Subject: [PATCH] avidemux: push mode: handle some more 0-size buffer cases Fixes https://bugzilla.gnome.org/show_bug.cgi?id=684944 --- gst/avi/gstavidemux.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c index d0df79e5dc..49364eb313 100644 --- a/gst/avi/gstavidemux.c +++ b/gst/avi/gstavidemux.c @@ -3393,7 +3393,9 @@ gst_avi_demux_stream_header_push (GstAviDemux * avi) } break; default: - if (gst_avi_demux_peek_chunk (avi, &tag, &size)) { + if (gst_avi_demux_peek_chunk (avi, &tag, &size) || size == 0) { + /* accept 0 size buffer here */ + avi->abort_buffering = FALSE; avi->offset += 8 + GST_ROUND_UP_2 (size); gst_adapter_flush (avi->adapter, 8 + GST_ROUND_UP_2 (size)); } else { @@ -3403,7 +3405,9 @@ gst_avi_demux_stream_header_push (GstAviDemux * avi) break; } } else { - if (gst_avi_demux_peek_chunk (avi, &tag, &size)) { + if (gst_avi_demux_peek_chunk (avi, &tag, &size) || size == 0) { + /* accept 0 size buffer here */ + avi->abort_buffering = FALSE; avi->offset += 8 + GST_ROUND_UP_2 (size); gst_adapter_flush (avi->adapter, 8 + GST_ROUND_UP_2 (size)); } else {