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
This commit is contained in:
Wim Taymans 2022-08-03 12:22:38 +02:00
parent a23d154952
commit e22e522ab8

View file

@ -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;
}