mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
flxdec: Properly skip non-frame chunks
This commit is contained in:
parent
ae3ee32f42
commit
1b5a8ac41c
1 changed files with 7 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue