[vlc-commits] auhal: fix listener leak in case of error
Thomas Guillem
git at videolan.org
Thu Mar 2 18:47:17 CET 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Mar 2 18:44:25 2017 +0100| [038ed68eebeeb1eba1a06a761affc4f539d659ec] | committer: Thomas Guillem
auhal: fix listener leak in case of error
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=038ed68eebeeb1eba1a06a761affc4f539d659ec
---
modules/audio_output/auhal.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index ebe8cb6..b469132 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -1454,7 +1454,7 @@ Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
if (ret != VLC_SUCCESS)
{
vlc_mutex_unlock(&p_sys->selected_device_lock);
- goto error;
+ return VLC_EGENERIC;
}
else
msg_Dbg(p_aout, "using default audio device %i", defaultDeviceID);
@@ -1492,9 +1492,10 @@ Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
}
}
-error:
- /* If we reach this, this aout has failed */
msg_Err(p_aout, "opening auhal output failed");
+ AO_UPDATELISTENER(p_sys->i_selected_dev, false, DeviceAliveListener, p_aout,
+ kAudioDevicePropertyDeviceIsAlive,
+ kAudioObjectPropertyScopeGlobal);
return VLC_EGENERIC;
}
More information about the vlc-commits
mailing list