[vlc-commits] Qt: escape demuxdump filename (refs #19841)

Francois Cartegnie git at videolan.org
Mon Feb 26 14:37:27 CET 2018


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Feb 26 13:12:10 2018 +0100| [b2c8fe2c66d7b4bd0c75bd66969cf7b654d2da1e] | committer: Francois Cartegnie

Qt: escape demuxdump filename (refs #19841)

(cherry picked from commit 2de830a525e394004daaadc83ee6726d5a359fd8)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=b2c8fe2c66d7b4bd0c75bd66969cf7b654d2da1e
---

 modules/gui/qt/dialogs/convert.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt/dialogs/convert.cpp b/modules/gui/qt/dialogs/convert.cpp
index 8a87518fa9..7ae9be5d92 100644
--- a/modules/gui/qt/dialogs/convert.cpp
+++ b/modules/gui/qt/dialogs/convert.cpp
@@ -178,10 +178,13 @@ void ConvertDialog::close()
     for(int i = 0; i < incomingMRLs->length(); i++)
     {
         QString mrl;
+        QString newFileName;
 
         if( dumpRadio->isChecked() )
         {
-            mrl = "demux=dump :demuxdump-file=" + fileLine->text();
+            newFileName = fileLine->text();
+            newFileName.replace( QChar('\''), "\\\'" );
+            mrl = QString( "demux=dump :demuxdump-file='%1'" ).arg( newFileName );
         }
         else
         {
@@ -197,8 +200,6 @@ void ConvertDialog::close()
                 mrl += "duplicate{dst=display,dst=";
             }
 
-            QString newFileName;
-
             // Only one file, use the destination provided
             if(singleFileSelected)
             {



More information about the vlc-commits mailing list