diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c index 0f17e75178..35e934edb0 100644 --- a/gst/flx/gstflxdec.c +++ b/gst/flx/gstflxdec.c @@ -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)