mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 08:11:16 +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);
|
||||
|
||||
/* should have caps by now */
|
||||
g_return_val_if_fail (gst_pad_has_current_caps (parse->srcpad),
|
||||
GST_FLOW_ERROR);
|
||||
if (!gst_pad_has_current_caps (parse->srcpad))
|
||||
goto no_caps;
|
||||
|
||||
/* segment adjustment magic; only if we are running the whole show */
|
||||
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);
|
||||
|
||||
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