vaapipluginbase: The allocation query can return without a pool

It is possible to return the min/max/size without actually providing
a pool. This way the source knows how many buffers downstream needs.

https://bugzilla.gnome.org/show_bug.cgi?id=748076
This commit is contained in:
Olivier Crete 2015-04-17 19:10:35 +00:00 committed by Víctor Manuel Jáquez Leal
parent 8c7bc7dff8
commit bd86647970

View file

@ -670,13 +670,15 @@ 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);
size = MAX (size, vi.size);
update_pool = TRUE;
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 */
has_video_alignment = gst_buffer_pool_has_option (pool,
GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT);
/* Check whether downstream element proposed a bufferpool but did
not provide a correct propose_allocation() implementation */
has_video_alignment = gst_buffer_pool_has_option (pool,
GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT);
}
} else {
pool = NULL;
size = vi.size;