]> git.sesse.net Git - vlc/commitdiff
Qt4 sout: convert option to UTF-8 once, not twice (fixes: #3077)
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 17 Oct 2009 09:07:15 +0000 (12:07 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 17 Oct 2009 09:07:15 +0000 (12:07 +0300)
modules/gui/qt4/dialogs_provider.cpp

index 5b29923fc2fa4cc7706446f7353258e746449394..de773c3047758d2fbeac86aa4a3c8bd398853dc2 100644 (file)
@@ -569,7 +569,7 @@ void DialogsProvider::streamingDialog( QWidget *parent,
                                        bool b_transcode_only,
                                        QStringList options )
 {
-    char *psz_soutoption;
+    QString soutoption;
 
     /* Stream */
     if( !b_transcode_only )
@@ -577,7 +577,7 @@ void DialogsProvider::streamingDialog( QWidget *parent,
         SoutDialog *s = new SoutDialog( parent, p_intf, mrl );
         if( s->exec() == QDialog::Accepted )
         {
-            psz_soutoption = strdup( qtu( s->getMrl() ) );
+            soutoption = s->getMrl();
             delete s;
         }
         else
@@ -589,7 +589,7 @@ void DialogsProvider::streamingDialog( QWidget *parent,
         ConvertDialog *s = new ConvertDialog( parent, p_intf, mrl );
         if( s->exec() == QDialog::Accepted )
         {
-            psz_soutoption = strdup( qtu( s->getMrl() ) );
+            soutoption = s->getMrl();
             delete s;
         }
         else
@@ -599,9 +599,9 @@ void DialogsProvider::streamingDialog( QWidget *parent,
     }
 
     /* Get SoutMRL */
-    if( !EMPTY_STR( psz_soutoption ) )
+    if( !soutoption.isEmpty() )
     {
-        options += QString( psz_soutoption ).split( " :");
+        options += soutoption.split( " :");
 
         /* Create Input */
         input_item_t *p_input;
@@ -627,7 +627,6 @@ void DialogsProvider::streamingDialog( QWidget *parent,
 
         RecentsMRL::getInstance( p_intf )->addRecent( mrl );
     }
-    free( psz_soutoption );
 }
 
 void DialogsProvider::openAndStreamingDialogs()