From bde3b072da7f76a7b7f9c6d64336b299e5646c3e Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Thu, 5 May 2016 15:16:02 +0200 Subject: [PATCH] vaapipostproc: use othercaps for preferred caps Instead of the allowed_srcpad_caps variable, this patch uses the othercaps from fixate_caps() vmethod to find the preferred caps feature and color format. https://bugzilla.gnome.org/show_bug.cgi?id=758548 --- gst/vaapi/gstvaapipostproc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gst/vaapi/gstvaapipostproc.c b/gst/vaapi/gstvaapipostproc.c index 60927de..bdb650d 100644 --- a/gst/vaapi/gstvaapipostproc.c +++ b/gst/vaapi/gstvaapipostproc.c @@ -1092,7 +1092,7 @@ gst_vaapipostproc_transform_caps (GstBaseTransform * trans, static GstCaps * gst_vaapipostproc_fixate_srccaps (GstVaapiPostproc * postproc, - GstCaps * sinkcaps) + GstCaps * sinkcaps, GstCaps * srccaps) { GstVideoInfo vi; GstVideoFormat out_format; @@ -1134,8 +1134,7 @@ gst_vaapipostproc_fixate_srccaps (GstVaapiPostproc * postproc, out_format = postproc->format; srcpad = GST_BASE_TRANSFORM_SRC_PAD (postproc); - feature = gst_vaapi_find_preferred_caps_feature (srcpad, - postproc->allowed_srcpad_caps, + feature = gst_vaapi_find_preferred_caps_feature (srcpad, srccaps, (out_format == GST_VIDEO_FORMAT_UNKNOWN) ? &out_format : NULL); if (feature == GST_VAAPI_CAPS_FEATURE_NOT_NEGOTIATED) @@ -1179,7 +1178,7 @@ gst_vaapipostproc_fixate_caps (GstBaseTransform * trans, goto done; } - if ((outcaps = gst_vaapipostproc_fixate_srccaps (postproc, caps))) + if ((outcaps = gst_vaapipostproc_fixate_srccaps (postproc, caps, othercaps))) gst_caps_replace (&othercaps, outcaps); done: -- 2.7.4