mimdec: Print the incoming fourcc on errors

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

View file

@ -181,10 +181,10 @@ gst_mimdec_chain (GstPad * pad, GstBuffer * in)
goto out; goto out;
} }
fourcc = GST_MAKE_FOURCC ('M', 'L', '2', '0'); fourcc = GUINT32_FROM_LE (*((guint32 *) (header + 12)));
if (GUINT32_FROM_LE (*((guint32 *) (header + 12))) != fourcc) { if (GST_MAKE_FOURCC ('M', 'L', '2', '0') != fourcc) {
GST_WARNING_OBJECT (mimdec, "invalid frame: unknown FOURCC code %d", GST_WARNING_OBJECT (mimdec, "invalid frame: unknown FOURCC code"
fourcc); " %X (%" GST_FOURCC_FORMAT ")", fourcc, GST_FOURCC_ARGS (fourcc));
gst_adapter_flush (mimdec->adapter, 24); gst_adapter_flush (mimdec->adapter, 24);
res = GST_FLOW_ERROR; res = GST_FLOW_ERROR;
goto out; goto out;