mimdec: Don't try to parse the header before dropping the paused frames

This commit is contained in:
Olivier Crête 2009-07-16 15:43:46 -04:00
parent 8eac8701ff
commit cee75e2c89

View file

@ -181,6 +181,12 @@ gst_mimdec_chain (GstPad * pad, GstBuffer * in)
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)));
if (GST_MAKE_FOURCC ('M', 'L', '2', '0') != fourcc) {
GST_WARNING_OBJECT (mimdec, "invalid frame: unknown FOURCC code"
@ -201,12 +207,6 @@ gst_mimdec_chain (GstPad * pad, GstBuffer * in)
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) {
goto out;
}