mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-03 16:09:39 +00:00
mimdec: Don't try to parse the header before dropping the paused frames
This commit is contained in:
parent
8eac8701ff
commit
cee75e2c89
1 changed files with 6 additions and 6 deletions
|
@ -181,6 +181,12 @@ gst_mimdec_chain (GstPad * pad, GstBuffer * in)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (header[1] == 1) {
|
||||||
|
/* This is a a paused frame, skip it */
|
||||||
|
gst_adapter_flush (mimdec->adapter, 24);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
fourcc = GUINT32_FROM_LE (*((guint32 *) (header + 12)));
|
fourcc = GUINT32_FROM_LE (*((guint32 *) (header + 12)));
|
||||||
if (GST_MAKE_FOURCC ('M', 'L', '2', '0') != fourcc) {
|
if (GST_MAKE_FOURCC ('M', 'L', '2', '0') != fourcc) {
|
||||||
GST_WARNING_OBJECT (mimdec, "invalid frame: unknown FOURCC code"
|
GST_WARNING_OBJECT (mimdec, "invalid frame: unknown FOURCC code"
|
||||||
|
@ -201,12 +207,6 @@ gst_mimdec_chain (GstPad * pad, GstBuffer * in)
|
||||||
mimdec->have_header = TRUE;
|
mimdec->have_header = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if its paused frame, drop it */
|
|
||||||
if (mimdec->payload_size == 0) {
|
|
||||||
mimdec->have_header = FALSE;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gst_adapter_available (mimdec->adapter) < mimdec->payload_size) {
|
if (gst_adapter_available (mimdec->adapter) < mimdec->payload_size) {
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue