videorate: keep pool if max_buffers is unlimited

The value 0 for max_buffers means unlimited. If the max_buffers are unlimited,
the videorate element shouldn't throw away the bufferpool, but just increase the
min_buffers value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5857>
This commit is contained in:
Michael Tretter 2023-12-14 12:31:01 +01:00 committed by GStreamer Marge Bot
parent fdfd51397b
commit 57a4d521fd

View file

@ -1407,7 +1407,7 @@ gst_video_rate_propose_allocation (GstBaseTransform * trans,
gst_query_parse_nth_allocation_pool (query, i, &pool, &size, &min, &max);
if (min == max) {
if (max != 0 && min == max) {
if (pool)
gst_object_unref (pool);
gst_query_remove_nth_allocation_pool (query, i);