summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Nauwelaerts <mnauw@users.sourceforge.net>2013-02-23 14:34:35 +0100
committerMark Nauwelaerts <mnauw@users.sourceforge.net>2013-02-24 21:30:52 +0100
commitd6289c4d65fd6d7fc6dd44f0d0873001b1a16297 (patch)
treedd783311616b0f0a0f0c147fc71dc97118c3518f
parent0adf1252f4c61e45182b9669b42b704353560cf1 (diff)
avidemux: push mode: handle some more 0-size buffer cases
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=684944
-rw-r--r--gst/avi/gstavidemux.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c
index 6e24a9984..efb2f3eb9 100644
--- a/gst/avi/gstavidemux.c
+++ b/gst/avi/gstavidemux.c
@@ -3378,7 +3378,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 {
@@ -3388,7 +3390,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 {