Commit 1b5a8ac4 authored by Sebastian Dröge's avatar Sebastian Dröge

flxdec: Properly skip non-frame chunks

parent ae3ee32f
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment