flxdec: Properly skip non-frame chunks

This commit is contained in:
Sebastian Dröge 2013-05-24 19:34:05 +02:00
parent ae3ee32f42
commit 1b5a8ac41c

View file

@ -543,7 +543,6 @@ gst_flxdec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
memcpy (&flxfh, data, FlxFrameChunkSize);
FLX_FRAME_CHUNK_FIX_ENDIANNESS (&flxfh);
gst_adapter_unmap (flxdec->adapter);
gst_adapter_flush (flxdec->adapter, FlxFrameChunkSize);
switch (flxfh.id) {
case FLX_FRAME_TYPE:
@ -588,6 +587,13 @@ gst_flxdec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
res = gst_pad_push (flxdec->srcpad, out);
break;
default:
/* check if we have the complete frame */
if (avail < flxfh.size)
goto need_more_data;
gst_adapter_flush (flxdec->adapter, flxfh.size);
break;
}
if (chunk)