diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2018-11-23 13:25:43 +0200 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2019-05-01 17:00:45 +0100 |
commit | 2d87fd688aeb5c42c01292e76cb6d9dc6ca27c0f (patch) | |
tree | 6f6092722c9f19920922ad717f071e6a9bf14a8d | |
parent | 4d6d426536ad54cf4b08534033d03a2cefea0d5e (diff) | |
download | gstreamer-plugins-base-2d87fd688aeb5c42c01292e76cb6d9dc6ca27c0f.tar.gz |
convertframe: Error out directly in the sync variant if the state change to PAUSED failed
-rw-r--r-- | gst-libs/gst/video/convertframe.c | 5 |
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); |