From 1d862dd70177ef26549dc606cc9b638f4d539502 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Sun, 28 Aug 2016 22:33:58 +0200 Subject: [PATCH] [pulseaudio] Extra state check when changing volume --- src/outputs/pulse.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/outputs/pulse.c b/src/outputs/pulse.c index 1686c09d..0bb23888 100644 --- a/src/outputs/pulse.c +++ b/src/outputs/pulse.c @@ -655,6 +655,9 @@ pulse_device_volume_set(struct output_device *device, output_status_cb cb) ps = device->session->session; + if ((context_check(p->context) < 0) || (stream_check(p, ps) < 0)) + return 0; + vol = PA_VOLUME_MUTED + (device->volume * (PA_VOLUME_NORM - PA_VOLUME_MUTED)) / 100; pa_cvolume_set(&cvol, 2, vol);