[vlc-commits] audiounit_ios: au_unit can't be null when stopping
Thomas Guillem
git at videolan.org
Wed Mar 1 17:49:47 CET 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Mar 1 15:19:19 2017 +0100| [543528862c25c9952a61c3ee27ed17a97c8df4cd] | committer: Thomas Guillem
audiounit_ios: au_unit can't be null when stopping
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=543528862c25c9952a61c3ee27ed17a97c8df4cd
---
modules/audio_output/audiounit_ios.m | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/modules/audio_output/audiounit_ios.m b/modules/audio_output/audiounit_ios.m
index 7c261cf..610f398 100644
--- a/modules/audio_output/audiounit_ios.m
+++ b/modules/audio_output/audiounit_ios.m
@@ -318,21 +318,22 @@ error:
static void Stop(audio_output_t *p_aout)
{
struct aout_sys_t *p_sys = p_aout->sys;
- OSStatus status;
+ OSStatus err;
- if (p_sys->au_unit) {
- status = AudioOutputUnitStop(p_sys->au_unit);
- if (status != noErr)
- msg_Warn(p_aout, "failed to stop AudioUnit (%i)", (int)status);
+ err = AudioOutputUnitStop(p_sys->au_unit);
+ if (err != noErr)
+ msg_Warn(p_aout, "AudioOutputUnitStop failed [%4.4s]",
+ (const char *)&err);
- status = AudioUnitUninitialize(p_sys->au_unit);
- if (status != noErr)
- msg_Warn(p_aout, "failed to uninit AudioUnit (%i)", (int)status);
+ err = AudioUnitUninitialize(p_sys->au_unit);
+ if (err != noErr)
+ msg_Warn(p_aout, "AudioUnitUninitialize failed [%4.4s]",
+ (const char *)&err);
- status = AudioComponentInstanceDispose(p_sys->au_unit);
- if (status != noErr)
- msg_Warn(p_aout, "failed to dispose Audio Component instance (%i)", (int)status);
- }
+ err = AudioComponentInstanceDispose(p_sys->au_unit);
+ if (err != noErr)
+ msg_Warn(p_aout, "AudioComponentInstanceDispose failed [%4.4s]",
+ (const char *)&err);
[[AVAudioSession sharedInstance] setActive:NO withOptions:AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation error:nil];
More information about the vlc-commits
mailing list