mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
baseparse: turn assert into a real error
Post a real error instead of just asserting.
This commit is contained in:
parent
63d95063a7
commit
9540014d2e
1 changed files with 9 additions and 2 deletions
|
@ -1919,8 +1919,8 @@ gst_base_parse_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
|
||||||
last_stop = last_start + GST_BUFFER_DURATION (buffer);
|
last_stop = last_start + GST_BUFFER_DURATION (buffer);
|
||||||
|
|
||||||
/* should have caps by now */
|
/* should have caps by now */
|
||||||
g_return_val_if_fail (gst_pad_has_current_caps (parse->srcpad),
|
if (!gst_pad_has_current_caps (parse->srcpad))
|
||||||
GST_FLOW_ERROR);
|
goto no_caps;
|
||||||
|
|
||||||
/* segment adjustment magic; only if we are running the whole show */
|
/* segment adjustment magic; only if we are running the whole show */
|
||||||
if (!parse->priv->passthrough && parse->segment.rate > 0.0 &&
|
if (!parse->priv->passthrough && parse->segment.rate > 0.0 &&
|
||||||
|
@ -2090,6 +2090,13 @@ gst_base_parse_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
|
||||||
gst_base_parse_frame_free (frame);
|
gst_base_parse_frame_free (frame);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
/* ERRORS */
|
||||||
|
no_caps:
|
||||||
|
{
|
||||||
|
GST_ELEMENT_ERROR (parse, STREAM, DECODE, ("No caps set"), (NULL));
|
||||||
|
return GST_FLOW_ERROR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue