summaryrefslogtreecommitdiff
path: root/gst-libs/gst/video/convertframe.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst/video/convertframe.c')
-rw-r--r--gst-libs/gst/video/convertframe.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gst-libs/gst/video/convertframe.c b/gst-libs/gst/video/convertframe.c
index 1f0487a20..b3e780a9c 100644
--- a/gst-libs/gst/video/convertframe.c
+++ b/gst-libs/gst/video/convertframe.c
@@ -337,7 +337,9 @@ gst_video_convert_sample (GstSample * sample, const GstCaps * to_caps,
* appsrc, this should preroll the converted buffer in appsink */
GST_DEBUG ("running conversion pipeline to caps %" GST_PTR_FORMAT,
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 */
GST_DEBUG ("feeding buffer %p, size %" G_GSIZE_FORMAT ", caps %"
@@ -400,6 +402,7 @@ gst_video_convert_sample (GstSample * sample, const GstCaps * to_caps,
/* ERRORS */
no_pipeline:
+state_change_failed:
{
gst_caps_unref (to_caps_copy);