From 33607f769c5542bdffb0abac1842793da18dfc20 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 2 Feb 2022 17:40:57 +0100 Subject: [PATCH] pulse-server: don't update channels when unset --- src/modules/module-protocol-pulse/format.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/module-protocol-pulse/format.c b/src/modules/module-protocol-pulse/format.c index 6a3346f00..70d9853e8 100644 --- a/src/modules/module-protocol-pulse/format.c +++ b/src/modules/module-protocol-pulse/format.c @@ -493,9 +493,11 @@ int format_parse_param(const struct spa_pod *param, struct sample_spec *ss, stru ss->channels = info.info.raw.channels; } if (map) { - map->channels = info.info.raw.channels; - for (i = 0; i < map->channels; i++) - map->map[i] = info.info.raw.position[i]; + if (info.info.raw.channels) { + map->channels = info.info.raw.channels; + for (i = 0; i < map->channels; i++) + map->map[i] = info.info.raw.position[i]; + } } return 0; }