From 28a946ccd6a8ec8dbd18ad18c824eb792ae0dbd8 Mon Sep 17 00:00:00 2001 From: Tobias Hieta Date: Tue, 15 Jan 2013 17:16:46 +0100 Subject: [CoreAudioAE] Fix CFString copy function in CCoreAudioHardware::GetOutputDeviceName Using UTF8 encoding might fail and return NULL. Instead we pass CFStringGetSystemEncoding(). --- xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioHardware.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioHardware.cpp b/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioHardware.cpp index c76b612307..b7f319ed94 100644 --- a/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioHardware.cpp +++ b/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioHardware.cpp @@ -329,7 +329,7 @@ void CCoreAudioHardware::GetOutputDeviceName(std::string& name) if (ret != noErr) return; - const char *cstr = CFStringGetCStringPtr(theDeviceName, kCFStringEncodingUTF8); + const char *cstr = CFStringGetCStringPtr(theDeviceName, CFStringGetSystemEncoding()); if (cstr) name = cstr; CFRelease(theDeviceName); -- cgit v1.2.3