Diff of /xbmc/cores/AudioRenderers/ALSADirectSound.cpp [c0fd1c] .. [4084eb]  Maximize  Restore

Repo status: analyzing...

  Switch to side-by-side view

--- a/xbmc/cores/AudioRenderers/ALSADirectSound.cpp
+++ b/xbmc/cores/AudioRenderers/ALSADirectSound.cpp
@@ -31,6 +31,13 @@
 #define CHECK_ALSA_RETURN(l,s,e) CHECK_ALSA((l),(s),(e)); if ((e)<0) return false;
 
 using namespace std;
+
+static CStdString QuoteDevice(const CStdString& device)
+{
+  CStdString result(device);
+  result.Replace("'", "\\'");
+  return "'" + result + "'";
+}
 
 //////////////////////////////////////////////////////////////////////
 // Construction/Destruction
@@ -153,7 +160,7 @@
     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)

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks