diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c index 1d8e6f9cad..5d73ae6eff 100644 --- a/gst/vaapi/gstvaapidecode.c +++ b/gst/vaapi/gstvaapidecode.c @@ -748,7 +748,7 @@ gst_vaapidecode_decide_allocation (GstVideoDecoder * vdec, GstQuery * query) #endif return gst_vaapi_plugin_base_decide_allocation (GST_VAAPI_PLUGIN_BASE (vdec), - query, 0); + query); /* ERRORS */ error_no_caps: diff --git a/gst/vaapi/gstvaapipluginbase.c b/gst/vaapi/gstvaapipluginbase.c index 34138b293b..055bf7e3cc 100644 --- a/gst/vaapi/gstvaapipluginbase.c +++ b/gst/vaapi/gstvaapipluginbase.c @@ -594,7 +594,7 @@ gst_vaapi_plugin_base_set_pool_config (GstBufferPool * pool, */ gboolean gst_vaapi_plugin_base_decide_allocation (GstVaapiPluginBase * plugin, - GstQuery * query, guint feature) + GstQuery * query) { GstCaps *caps = NULL; GstBufferPool *pool; @@ -620,17 +620,14 @@ gst_vaapi_plugin_base_decide_allocation (GstVaapiPluginBase * plugin, if (!caps) goto error_no_caps; - if (!feature) - feature = gst_vaapi_find_preferred_caps_feature (plugin->srcpad, caps, - NULL); - has_video_meta = gst_query_find_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL); #if (USE_GLX || USE_EGL) has_texture_upload_meta = gst_query_find_allocation_meta (query, GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE, &idx) && - (feature == GST_VAAPI_CAPS_FEATURE_GL_TEXTURE_UPLOAD_META); + gst_vaapi_caps_feature_contains (caps, + GST_VAAPI_CAPS_FEATURE_GL_TEXTURE_UPLOAD_META); #if USE_GST_GL_HELPERS if (has_texture_upload_meta) { diff --git a/gst/vaapi/gstvaapipluginbase.h b/gst/vaapi/gstvaapipluginbase.h index 27c7491cb4..ce76d519fc 100644 --- a/gst/vaapi/gstvaapipluginbase.h +++ b/gst/vaapi/gstvaapipluginbase.h @@ -213,7 +213,7 @@ gst_vaapi_plugin_base_propose_allocation (GstVaapiPluginBase * plugin, G_GNUC_INTERNAL gboolean gst_vaapi_plugin_base_decide_allocation (GstVaapiPluginBase * plugin, - GstQuery * query, guint feature); + GstQuery * query); G_GNUC_INTERNAL GstFlowReturn diff --git a/gst/vaapi/gstvaapipostproc.c b/gst/vaapi/gstvaapipostproc.c index 53b2b70a79..a567b0b344 100644 --- a/gst/vaapi/gstvaapipostproc.c +++ b/gst/vaapi/gstvaapipostproc.c @@ -1334,7 +1334,7 @@ static gboolean gst_vaapipostproc_decide_allocation (GstBaseTransform * trans, GstQuery * query) { return gst_vaapi_plugin_base_decide_allocation (GST_VAAPI_PLUGIN_BASE (trans), - query, 0); + query); } static void