diff options
-rw-r--r-- | xbmc/cores/AudioRenderers/ALSADirectSound.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/xbmc/cores/AudioRenderers/ALSADirectSound.cpp b/xbmc/cores/AudioRenderers/ALSADirectSound.cpp index 8eedc3fe44..64be1b8fe1 100644 --- a/xbmc/cores/AudioRenderers/ALSADirectSound.cpp +++ b/xbmc/cores/AudioRenderers/ALSADirectSound.cpp @@ -32,6 +32,13 @@ using namespace std; +static CStdString QuoteDevice(const CStdString& device) +{ + CStdString result(device); + result.Replace("'", "\\'"); + return "'" + result + "'"; +} + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// @@ -153,7 +160,7 @@ bool CALSADirectSound::Initialize(IAudioCallback* pCallback, const CStdString& d if((deviceuse + ":").Left(5) == "hdmi:" || (deviceuse + ":").Left(7) == "iec958:" || (deviceuse + ":").Left(6) == "spdif:") - deviceuse = "plug:" + deviceuse; + deviceuse = "plug:" + QuoteDevice(deviceuse); if(deviceuse == "default") switch(iChannels) |