Browse Source

CodecsComponent: fix codecs paths containing ' characters

av_get_token() interprets these, so we have to escape them. Fixes
operation with usernames that contain ' characters.
Vincent Lang 8 years ago
parent
commit
a4e37e6af6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/player/CodecsComponent.cpp

+ 1 - 1
src/player/CodecsComponent.cpp

@@ -352,7 +352,7 @@ void Codecs::preinitCodecs()
   QDir("").mkpath(path);
 
   // Follows the convention used by av_get_token().
-  QString escapedPath = path.replace("\\", "\\\\").replace(":", "\\:");
+  QString escapedPath = path.replace("\\", "\\\\").replace(":", "\\:").replace("'", "\\'");
   // This must be run before any threads are started etc. (for safety).
 #ifdef Q_OS_WIN
   SetEnvironmentVariableW(L"FFMPEG_EXTERNAL_LIBS", escapedPath.toStdWString().c_str());