From d70a2e8d130f4bff935d674ce0f8ee8bede6867e Mon Sep 17 00:00:00 2001 From: Olivier Crete Date: Mon, 27 Apr 2015 19:21:12 -0400 Subject: [PATCH] vaapipluginbase: Update the pool if there was no pool in the downstream reply MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fix regression introduced by bd866479, the query after decide_allocation() always needs a pool in the first slot. Signed-off-by: Víctor Manuel Jáquez Leal https://bugzilla.gnome.org/show_bug.cgi?id=748559 --- gst/vaapi/gstvaapipluginbase.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gst/vaapi/gstvaapipluginbase.c b/gst/vaapi/gstvaapipluginbase.c index e8079d0..23c14a6 100644 --- a/gst/vaapi/gstvaapipluginbase.c +++ b/gst/vaapi/gstvaapipluginbase.c @@ -607,7 +607,7 @@ gst_vaapi_plugin_base_decide_allocation (GstVaapiPluginBase * plugin, GstStructure *config; GstVideoInfo vi; guint size, min, max; - gboolean need_pool, update_pool; + gboolean need_pool, update_pool = FALSE; gboolean has_video_meta = FALSE; gboolean has_video_alignment = FALSE; #if (USE_GLX || USE_EGL) @@ -670,9 +670,9 @@ gst_vaapi_plugin_base_decide_allocation (GstVaapiPluginBase * plugin, if (gst_query_get_n_allocation_pools (query) > 0) { gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max); + update_pool = (pool != NULL); if (pool) { size = MAX (size, vi.size); - update_pool = TRUE; /* Check whether downstream element proposed a bufferpool but did not provide a correct propose_allocation() implementation */ @@ -683,7 +683,6 @@ gst_vaapi_plugin_base_decide_allocation (GstVaapiPluginBase * plugin, pool = NULL; size = vi.size; min = max = 0; - update_pool = FALSE; } /* GstVaapiVideoMeta is mandatory, and this implies VA surface memory */ -- 2.7.4