aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Hieta <tobias@plexapp.com>2013-01-15 17:16:46 +0100
committerS. Davilla <davilla@4pi.com>2013-01-18 10:21:53 -0500
commit28a946ccd6a8ec8dbd18ad18c824eb792ae0dbd8 (patch)
treee5d88141a1c0f4405ad418a780384a15b2fe619f
parent3b8ad7dfb493389e47461f7fb705b2a20dd5fa2a (diff)
[CoreAudioAE] Fix CFString copy function in CCoreAudioHardware::GetOutputDeviceName
Using UTF8 encoding might fail and return NULL. Instead we pass CFStringGetSystemEncoding().
-rw-r--r--xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioHardware.cpp2
1 files changed, 1 insertions, 1 deletions
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);