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.
This commit is contained in:
U. Artie Eoff 2020-02-21 06:54:47 -08:00
parent 15e169fbf1
commit 39f2c932ee

View file

@ -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);