In some cases we might not be able to figure out the fixed format
from the header.
Properly error out in those cases.
if (caps == NULL)
goto cannot_decode;
+ if (!gst_caps_is_fixed (caps))
+ goto non_fixed_caps;
+
if (ogm->srcpad) {
GstCaps *current_caps = gst_pad_get_current_caps (ogm->srcpad);
GST_ELEMENT_ERROR (ogm, STREAM, DECODE, (NULL), ("unknown ogm format"));
return GST_FLOW_ERROR;
}
+non_fixed_caps:
+ {
+ gst_caps_unref (caps);
+ GST_ELEMENT_ERROR (ogm, STREAM, DECODE, (NULL), ("broken ogm format"));
+ return GST_FLOW_ERROR;
+ }
}
static GstFlowReturn