소스 검색

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 9 년 전
부모
커밋
a4e37e6af6
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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());