vaapidecode: remove chroma-site and colorimetry from src caps

https://bugzilla.gnome.org/show_bug.cgi?id=766596
This commit is contained in:
Hyunjun Ko 2016-06-08 10:17:46 +09:00 committed by Víctor Manuel Jáquez Leal
parent 4791e9f2ea
commit 1e52269b89

View file

@ -302,6 +302,14 @@ gst_vaapidecode_update_src_caps (GstVaapiDecode * decode)
switch (feature) { switch (feature) {
case GST_VAAPI_CAPS_FEATURE_GL_TEXTURE_UPLOAD_META: case GST_VAAPI_CAPS_FEATURE_GL_TEXTURE_UPLOAD_META:
case GST_VAAPI_CAPS_FEATURE_VAAPI_SURFACE:{ 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); feature_str = gst_vaapi_caps_feature_to_string (feature);
features = gst_caps_features_new (feature_str, NULL); features = gst_caps_features_new (feature_str, NULL);
gst_caps_set_features (state->caps, 0, features); gst_caps_set_features (state->caps, 0, features);