From e22e522ab86ee14b5ab5442b651ca89731bd32eb Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 3 Aug 2022 12:22:38 +0200 Subject: [PATCH] alsa-pcm: limit the target to the buffer size Don't try to wait for more samples than can fit in the ringbuffer. See #2603 --- spa/plugins/alsa/alsa-pcm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/spa/plugins/alsa/alsa-pcm.c b/spa/plugins/alsa/alsa-pcm.c index 31fdf7cbc..8e335a89d 100644 --- a/spa/plugins/alsa/alsa-pcm.c +++ b/spa/plugins/alsa/alsa-pcm.c @@ -1778,6 +1778,7 @@ static int get_status(struct state *state, uint64_t current_time, *delay = avail; *target = SPA_MAX(*target, state->read_size); } + *target = SPA_MIN(*target, state->buffer_frames); return 0; }