From 1e52269b893b1bd02d88fe70309d692afa823718 Mon Sep 17 00:00:00 2001 From: Hyunjun Ko Date: Wed, 8 Jun 2016 10:17:46 +0900 Subject: [PATCH] vaapidecode: remove chroma-site and colorimetry from src caps https://bugzilla.gnome.org/show_bug.cgi?id=766596 --- gst/vaapi/gstvaapidecode.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c index 8bfc4eab98..9c674c2d8a 100644 --- a/gst/vaapi/gstvaapidecode.c +++ b/gst/vaapi/gstvaapidecode.c @@ -302,6 +302,14 @@ gst_vaapidecode_update_src_caps (GstVaapiDecode * decode) switch (feature) { case GST_VAAPI_CAPS_FEATURE_GL_TEXTURE_UPLOAD_META: case GST_VAAPI_CAPS_FEATURE_VAAPI_SURFACE:{ + GstStructure *structure = gst_caps_get_structure (state->caps, 0); + + /* Remove chroma-site and colorimetry from src caps, + * which is unnecessary on downstream if using VASurface + */ + gst_structure_remove_fields (structure, "chroma-site", "colorimetry", + NULL); + feature_str = gst_vaapi_caps_feature_to_string (feature); features = gst_caps_features_new (feature_str, NULL); gst_caps_set_features (state->caps, 0, features);