avidemux: push mode: handle some more 0-size buffer cases

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=684944
This commit is contained in:
Mark Nauwelaerts 2013-02-23 14:34:35 +01:00
parent 8004ae0369
commit 56e2767c20

View file

@ -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 {