We were assuming that NULL pool meant that downstream didn't reply.
Update the pool index 0 instead of adding at the end. Otherwise we ended
up letting basesrc decide, which would pick the blocksize as a size
(4096) instead of the image size.
https://bugzilla.gnome.org/show_bug.cgi?id=795327
size = info.size;
min = 1;
max = 0;
- gst_query_add_allocation_pool (query, pool, size, min, max);
+
+ if (gst_query_get_n_allocation_pools (query) > 0)
+ gst_query_set_nth_allocation_pool (query, 0, pool, size, min, max);
+ else
+ gst_query_add_allocation_pool (query, pool, size, min, max);
}
config = gst_buffer_pool_get_config (pool);