diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2018-04-25 15:05:38 -0400 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2018-04-25 15:07:23 -0400 |
commit | ede8b1c8ce90c18be548d9ec88ba8c53d14b5043 (patch) | |
tree | 6ec77145aa483eab2075857a0f3f2f592c50e3ec /gst | |
parent | 5d1efe7f556f4a47a2a80d19bc73ea1875fbcc73 (diff) |
rfbsrc: Fix decide_allocation to support NULL pool
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
Diffstat (limited to 'gst')
-rw-r--r-- | gst/librfb/gstrfbsrc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gst/librfb/gstrfbsrc.c b/gst/librfb/gstrfbsrc.c index 786d32d4c..9c9b5ab0d 100644 --- a/gst/librfb/gstrfbsrc.c +++ b/gst/librfb/gstrfbsrc.c @@ -372,7 +372,11 @@ gst_rfb_src_decide_allocation (GstBaseSrc * bsrc, GstQuery * query) 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); |