mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
convertframe: Error out directly in the sync variant if the state change to PAUSED failed
This commit is contained in:
parent
963a318c86
commit
de69fc148d
1 changed files with 4 additions and 1 deletions
|
@ -340,7 +340,9 @@ gst_video_convert_sample (GstSample * sample, const GstCaps * to_caps,
|
||||||
* appsrc, this should preroll the converted buffer in appsink */
|
* appsrc, this should preroll the converted buffer in appsink */
|
||||||
GST_DEBUG ("running conversion pipeline to caps %" GST_PTR_FORMAT,
|
GST_DEBUG ("running conversion pipeline to caps %" GST_PTR_FORMAT,
|
||||||
to_caps_copy);
|
to_caps_copy);
|
||||||
gst_element_set_state (pipeline, GST_STATE_PAUSED);
|
if (gst_element_set_state (pipeline,
|
||||||
|
GST_STATE_PAUSED) == GST_STATE_CHANGE_FAILURE)
|
||||||
|
goto state_change_failed;
|
||||||
|
|
||||||
/* feed buffer in appsrc */
|
/* feed buffer in appsrc */
|
||||||
GST_DEBUG ("feeding buffer %p, size %" G_GSIZE_FORMAT ", caps %"
|
GST_DEBUG ("feeding buffer %p, size %" G_GSIZE_FORMAT ", caps %"
|
||||||
|
@ -403,6 +405,7 @@ gst_video_convert_sample (GstSample * sample, const GstCaps * to_caps,
|
||||||
|
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
no_pipeline:
|
no_pipeline:
|
||||||
|
state_change_failed:
|
||||||
{
|
{
|
||||||
gst_caps_unref (to_caps_copy);
|
gst_caps_unref (to_caps_copy);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue