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) ...@@ -543,7 +543,6 @@ gst_flxdec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
memcpy (&flxfh, data, FlxFrameChunkSize); memcpy (&flxfh, data, FlxFrameChunkSize);
FLX_FRAME_CHUNK_FIX_ENDIANNESS (&flxfh); FLX_FRAME_CHUNK_FIX_ENDIANNESS (&flxfh);
gst_adapter_unmap (flxdec->adapter); gst_adapter_unmap (flxdec->adapter);
gst_adapter_flush (flxdec->adapter, FlxFrameChunkSize);
switch (flxfh.id) { switch (flxfh.id) {
case FLX_FRAME_TYPE: case FLX_FRAME_TYPE:
...@@ -588,6 +587,13 @@ gst_flxdec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) ...@@ -588,6 +587,13 @@ gst_flxdec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
res = gst_pad_push (flxdec->srcpad, out); res = gst_pad_push (flxdec->srcpad, out);
break; 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) 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