mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
ogmparse: Error out if we can't figure out the format
In some cases we might not be able to figure out the fixed format from the header. Properly error out in those cases.
This commit is contained in:
parent
33709106e9
commit
0297bc2a4f
1 changed files with 9 additions and 0 deletions
|
@ -615,6 +615,9 @@ gst_ogm_parse_stream_header (GstOgmParse * ogm, const guint8 * data, guint size)
|
|||
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);
|
||||
|
||||
|
@ -679,6 +682,12 @@ cannot_decode:
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue