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/5957>
This commit is contained in:
Michael Tretter 2023-12-14 12:31:01 +01:00 committed by GStreamer Marge Bot
parent 0ce3a2782c
commit 6744cb0d20

View file

@ -1372,7 +1372,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);