From de137908a85bb252a7183225e1dba042a3f9f863 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Thu, 27 Jan 2022 22:03:55 -0500 Subject: [PATCH] sink: Only update sink inputs if reconfiguration succeeds --- src/pulsecore/sink.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index f58a50131..7c2f0a575 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -1638,11 +1638,11 @@ void pa_sink_reconfigure(pa_sink *s, pa_sample_spec *spec, pa_channel_map *map, pa_log_info("Reconfigured successfully to: %s, %s", pa_sample_spec_snprint(spec_str, sizeof(spec_str), &s->sample_spec), pa_channel_map_snprint(map_str, sizeof(map_str), &s->channel_map)); - } - PA_IDXSET_FOREACH(i, s->inputs, idx) { - if (i->state == PA_SINK_INPUT_CORKED) - pa_sink_input_update_resampler(i, true); + PA_IDXSET_FOREACH(i, s->inputs, idx) { + if (i->state == PA_SINK_INPUT_CORKED) + pa_sink_input_update_resampler(i, true); + } } if (!restore && !pa_channel_map_equal(&old_map, &s->channel_map)) {