summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorU. Artie Eoff <ullysses.a.eoff@intel.com>2020-02-21 06:54:47 -0800
committerU. Artie Eoff <ullysses.a.eoff@intel.com>2020-02-21 08:28:10 -0800
commit39f2c932ee8ef2f61e6980db15097053660a5aa4 (patch)
treea227df08f8a1e19958d447d66b8121efc89d47e6 /gst
parent15e169fbf1d7ea57a122ec0bdbd38d51ba61284f (diff)
vaapipostproc: only set VPP colorimetry when VPP is available
If we don't have functional vpp then we should not call gst_vaapi_filter_set_colorimetry.
Diffstat (limited to 'gst')
-rw-r--r--gst/vaapi/gstvaapipostproc.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gst/vaapi/gstvaapipostproc.c b/gst/vaapi/gstvaapipostproc.c
index 31c35f02..0fb75b82 100644
--- a/gst/vaapi/gstvaapipostproc.c
+++ b/gst/vaapi/gstvaapipostproc.c
@@ -1654,11 +1654,14 @@ gst_vaapipostproc_set_caps (GstBaseTransform * trans, GstCaps * caps,
gst_vaapipostproc_set_passthrough (trans);
}
- ret = gst_vaapi_filter_set_colorimetry (postproc->filter,
- &GST_VIDEO_INFO_COLORIMETRY (GST_VAAPI_PLUGIN_BASE_SINK_PAD_INFO
- (postproc)),
- &GST_VIDEO_INFO_COLORIMETRY (GST_VAAPI_PLUGIN_BASE_SRC_PAD_INFO
- (postproc)));
+ if (postproc->has_vpp && !gst_vaapi_filter_set_colorimetry (postproc->filter,
+ &GST_VIDEO_INFO_COLORIMETRY (GST_VAAPI_PLUGIN_BASE_SINK_PAD_INFO
+ (postproc)),
+ &GST_VIDEO_INFO_COLORIMETRY (GST_VAAPI_PLUGIN_BASE_SRC_PAD_INFO
+ (postproc))))
+ goto done;
+
+ ret = TRUE;
done:
g_mutex_unlock (&postproc->postproc_lock);