From 9984678398de39f73dba3d866f49c2611190a5de Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Thu, 2 Jul 2015 17:49:25 +0200 Subject: [PATCH] vaapipostproc: no format convert on GL tex upload meta When GL texture upload meta is negotiated, vaapipostproc shall not modify the color format of the buffer. https://bugzilla.gnome.org/show_bug.cgi?id=748184 --- gst/vaapi/gstvaapipostproc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gst/vaapi/gstvaapipostproc.c b/gst/vaapi/gstvaapipostproc.c index 427d8ad..d80d0912 100644 --- a/gst/vaapi/gstvaapipostproc.c +++ b/gst/vaapi/gstvaapipostproc.c @@ -1109,7 +1109,6 @@ gst_vaapipostproc_transform_caps_impl (GstBaseTransform * trans, peer_caps = gst_caps_fixate (peer_caps); gst_video_info_from_caps (&peer_vi, peer_caps); out_format = GST_VIDEO_INFO_FORMAT (&peer_vi); - postproc->format = out_format; if (peer_caps) gst_caps_unref (peer_caps); } @@ -1129,6 +1128,13 @@ gst_vaapipostproc_transform_caps_impl (GstBaseTransform * trans, gst_caps_set_features (out_caps, 0, gst_caps_features_new (feature_str, NULL)); } + + /* we don't need to do format conversion if GL_TEXTURE_UPLOAD_META + * is negotiated */ + if (feature != GST_VAAPI_CAPS_FEATURE_GL_TEXTURE_UPLOAD_META && + postproc->format != out_format) { + postproc->format = out_format; + } return out_caps; } -- 2.7.4