mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-08 23:42:28 +00:00
appsrc: Post a bus error if a segment can't be applied
When applying segments from the input samples, post a bus error and fail loudly if the segment fails to configure, instead of just posting debug output. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/783>
This commit is contained in:
parent
42b3025bdc
commit
b18fd0f239
1 changed files with 10 additions and 2 deletions
|
@ -1324,8 +1324,8 @@ gst_app_src_create (GstBaseSrc * bsrc, guint64 offset, guint size,
|
||||||
if (!gst_base_src_new_segment (bsrc, segment)) {
|
if (!gst_base_src_new_segment (bsrc, segment)) {
|
||||||
GST_ERROR_OBJECT (appsrc,
|
GST_ERROR_OBJECT (appsrc,
|
||||||
"Couldn't set new segment %" GST_PTR_FORMAT, event);
|
"Couldn't set new segment %" GST_PTR_FORMAT, event);
|
||||||
ret = GST_FLOW_ERROR;
|
gst_event_unref (event);
|
||||||
break;
|
goto invalid_segment;
|
||||||
}
|
}
|
||||||
gst_segment_copy_into (segment, &priv->current_segment);
|
gst_segment_copy_into (segment, &priv->current_segment);
|
||||||
}
|
}
|
||||||
|
@ -1405,6 +1405,14 @@ seek_error:
|
||||||
GST_ERROR_SYSTEM);
|
GST_ERROR_SYSTEM);
|
||||||
return GST_FLOW_ERROR;
|
return GST_FLOW_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
invalid_segment:
|
||||||
|
{
|
||||||
|
g_mutex_unlock (&priv->mutex);
|
||||||
|
GST_ELEMENT_ERROR (appsrc, LIBRARY, SETTINGS,
|
||||||
|
(NULL), ("Failed to configure the provided input segment."));
|
||||||
|
return GST_FLOW_ERROR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* external API */
|
/* external API */
|
||||||
|
|
Loading…
Reference in a new issue