From 519bd342be33f4cecb05bcdeb87c163e4b380880 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 14 Jun 2021 12:16:49 +0200 Subject: [PATCH] audioconvert: don't use samplerate to negotiate The merger and splitter use the samplerate from the _io_position for the DSP formats so set the samplerate to 0 to make sure we don't use it to negotiate a format with the peer. --- spa/plugins/audioconvert/merger.c | 2 ++ spa/plugins/audioconvert/splitter.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/spa/plugins/audioconvert/merger.c b/spa/plugins/audioconvert/merger.c index 286978983..7515fcf37 100644 --- a/spa/plugins/audioconvert/merger.c +++ b/spa/plugins/audioconvert/merger.c @@ -542,6 +542,8 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags, if (spa_format_audio_raw_parse(format, &info.info.raw) < 0) return -EINVAL; + info.info.raw.rate = 0; + if (this->have_profile && memcmp(&this->format, &info, sizeof(info)) == 0) return 0; diff --git a/spa/plugins/audioconvert/splitter.c b/spa/plugins/audioconvert/splitter.c index cf5e60edf..82b4088a5 100644 --- a/spa/plugins/audioconvert/splitter.c +++ b/spa/plugins/audioconvert/splitter.c @@ -325,6 +325,8 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags, if (spa_format_audio_raw_parse(format, &info.info.raw) < 0) return -EINVAL; + info.info.raw.rate = 0; + if (this->have_profile && memcmp(&this->format, &info, sizeof(info)) == 0) return 0;