vaapipostproc: set srcpad colorimetry unconditionally
authorU. Artie Eoff <ullysses.a.eoff@intel.com>
Tue, 4 Feb 2020 17:57:42 +0000 (09:57 -0800)
committerU. Artie Eoff <ullysses.a.eoff@intel.com>
Wed, 5 Feb 2020 18:16:16 +0000 (10:16 -0800)
We always need a srcpad colorimetry for VAAPI VPP
operations.

Also, check the return value of _set_colorimetry.

gst/vaapi/gstvaapipostprocutil.c

index a11e555..51cf7d7 100644 (file)
@@ -719,8 +719,8 @@ _get_preferred_caps (GstVaapiPostproc * postproc, GstVideoInfo * vinfo,
     goto fixate_failed;
   _set_multiview_mode (postproc, vinfo, structure);
 
-  if (f == GST_VAAPI_CAPS_FEATURE_SYSTEM_MEMORY)
-    _set_colorimetry (postproc, format, structure);
+  if (!_set_colorimetry (postproc, format, structure))
+    goto fixate_failed;
 
   if (!_set_interlace_mode (postproc, vinfo, structure))
     goto interlace_mode_failed;