diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c index c8274829b3..8bfc4eab98 100644 --- a/gst/vaapi/gstvaapidecode.c +++ b/gst/vaapi/gstvaapidecode.c @@ -732,12 +732,11 @@ gst_vaapidecode_decide_allocation (GstVideoDecoder * vdec, GstQuery * query) GstCaps *caps = NULL; gst_query_parse_allocation (query, &caps, NULL); - - decode->has_texture_upload_meta = FALSE; - if (!caps) goto error_no_caps; + decode->has_texture_upload_meta = FALSE; + #if (USE_GLX || USE_EGL) decode->has_texture_upload_meta = gst_query_find_allocation_meta (query, diff --git a/gst/vaapi/gstvaapipluginbase.c b/gst/vaapi/gstvaapipluginbase.c index e30e24d1d5..000e326e52 100644 --- a/gst/vaapi/gstvaapipluginbase.c +++ b/gst/vaapi/gstvaapipluginbase.c @@ -597,10 +597,10 @@ gst_vaapi_plugin_base_propose_allocation (GstVaapiPluginBase * plugin, gboolean need_pool; gst_query_parse_allocation (query, &caps, &need_pool); + if (!caps) + goto error_no_caps; if (need_pool) { - if (!caps) - goto error_no_caps; if (!ensure_sinkpad_buffer_pool (plugin, caps)) return FALSE; gst_query_add_allocation_pool (query, plugin->sinkpad_buffer_pool, @@ -665,14 +665,13 @@ gst_vaapi_plugin_base_decide_allocation (GstVaapiPluginBase * plugin, g_return_val_if_fail (plugin->display != NULL, FALSE); gst_query_parse_allocation (query, &caps, NULL); + if (!caps) + goto error_no_caps; /* We don't need any GL context beyond this point if not requested so explicitly through GstVideoGLTextureUploadMeta */ gst_object_replace (&plugin->gl_context, NULL); - if (!caps) - goto error_no_caps; - has_video_meta = gst_query_find_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL);