mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
module-loopback: only enable delay with valid rate and channels
Or else we can't calculate the required delay buffer size and we might even end up with a double free. Fixes #3748
This commit is contained in:
parent
98f9529147
commit
e9f0638a70
1 changed files with 1 additions and 1 deletions
|
|
@ -347,7 +347,7 @@ static void param_tag_changed(struct impl *impl, const struct spa_pod *param,
|
|||
|
||||
static void recalculate_buffer(struct impl *impl)
|
||||
{
|
||||
if (impl->target_delay > 0.0f) {
|
||||
if (impl->target_delay > 0.0f && impl->info.channels > 0 && impl->rate > 0) {
|
||||
uint32_t delay = impl->rate * impl->target_delay;
|
||||
void *data;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue