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
This commit is contained in:
Víctor Manuel Jáquez Leal 2015-07-02 17:49:25 +02:00
parent eb465fb392
commit 9984678398

View file

@ -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;
}