[vlc-devel] [PATCH 3/4] audiounit_ios: use ca_MuteSet
Thomas Guillem
thomas at gllm.fr
Wed Apr 21 15:00:40 UTC 2021
Fix data race with au_init, leading to crashes, since the audiounit was
stopped from a different thread than the playback one. Indeed, mute
callback can be called from any threads.
---
modules/audio_output/audiounit_ios.m | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/modules/audio_output/audiounit_ios.m b/modules/audio_output/audiounit_ios.m
index e0547b514f0..b9f69982e6b 100644
--- a/modules/audio_output/audiounit_ios.m
+++ b/modules/audio_output/audiounit_ios.m
@@ -408,15 +408,8 @@ Pause (audio_output_t *p_aout, bool pause, vlc_tick_t date)
static int
MuteSet(audio_output_t *p_aout, bool mute)
{
- aout_sys_t * p_sys = p_aout->sys;
-
- p_sys->b_muted = mute;
- if (p_sys->au_unit != NULL)
- {
- Pause(p_aout, mute, 0);
- if (mute)
- ca_Flush(p_aout);
- }
+ ca_MuteSet(p_aout, mute);
+ aout_MuteReport(p_aout, mute);
return VLC_SUCCESS;
}
--
2.30.0
More information about the vlc-devel
mailing list