fakevideodec: fix minimum allocation pool size

Before it was setting the minimum between 2 and the minimum gst_query_parse_nth_allocation_pool(). So, always
giving 2 or less.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7465>
This commit is contained in:
Diego Nieto 2024-09-07 11:53:05 +02:00 committed by GStreamer Marge Bot
parent 76d753f1c5
commit dcfc66a1ac

View file

@ -460,7 +460,7 @@ gst_fake_video_dec_decide_allocation (GstVideoDecoder * bdec, GstQuery * query)
g_assert (pool != NULL);
/* Initialize at least 2 buffers. */
dec->min_buffers = MIN (min_buffers, 2);
dec->min_buffers = MAX (min_buffers, 2);
config = gst_buffer_pool_get_config (pool);
if (gst_query_find_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL)) {