summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorU. Artie Eoff <ullysses.a.eoff@intel.com>2020-01-30 12:34:07 -0800
committerU. Artie Eoff <ullysses.a.eoff@intel.com>2020-02-05 10:16:16 -0800
commit654e824555552a8baf0a9ccb702208fc6a08985c (patch)
tree7f7914896942ae66ff7fab686c85f1014b8bcad2
parentc01f2e30d6bb531c9c8a27ed0beb34d12c68ad9a (diff)
vaapipostproc: do not override explicit srcpad colorimetry
If colorimetry has been set by a capsfilter (e.g. vaapipostproc ! video/x-raw,colorimetry=bt709) then don't try to override it. Previously, the aforementioned capsfilter will fail to negotiate if default colorimetry is not the same as the capsfilter (e.g. 4K resolutions).
-rw-r--r--gst/vaapi/gstvaapipostprocutil.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gst/vaapi/gstvaapipostprocutil.c b/gst/vaapi/gstvaapipostprocutil.c
index 1e09e061..a11e5552 100644
--- a/gst/vaapi/gstvaapipostprocutil.c
+++ b/gst/vaapi/gstvaapipostprocutil.c
@@ -614,6 +614,10 @@ _set_colorimetry (GstVaapiPostproc * postproc, GstVideoFormat format,
gst_video_chroma_to_string (GST_VIDEO_INFO_CHROMA_SITE (&vinfo)), NULL);
}
+ /* if outs structure already specifies colorimetry, use it */
+ if (gst_structure_has_field (outs, "colorimetry"))
+ return TRUE;
+
/* make sure we set the RGB matrix for RGB formats */
colorimetry = GST_VIDEO_INFO_COLORIMETRY (&vinfo);
if (GST_VIDEO_FORMAT_INFO_IS_RGB (vinfo.finfo) &&
@@ -733,7 +737,7 @@ _get_preferred_caps (GstVaapiPostproc * postproc, GstVideoInfo * vinfo,
postproc->format = format;
}
- return outcaps;
+ return gst_caps_fixate (outcaps);
/* ERRORS */
fixate_failed: