]> git.sesse.net Git - kdenlive/commitdiff
Fix transcode failure with space in file name.
authorDan Dennedy <dan@dennedy.org>
Thu, 1 Oct 2009 05:47:03 +0000 (05:47 +0000)
committerDan Dennedy <dan@dennedy.org>
Thu, 1 Oct 2009 05:47:03 +0000 (05:47 +0000)
svn path=/trunk/kdenlive/; revision=3968

src/cliptranscode.cpp

index 83e3ccccc675276b1ab52cbb6cbd2d6f054176cf..6b431fc94bd71da377a1df5dfdd3437114788cfb 100644 (file)
@@ -107,7 +107,6 @@ void ClipTranscode::slotStartTransCode()
         destination = dest_url->url().path().section('.', 0, -2);
     }
     QString extension = params.section("%1", 1, 1).section(' ', 0, 0);
-    params = params.replace("%1", destination);
     QString s_url = source_url->url().path();
 
     parameters << "-i" << s_url;
@@ -115,10 +114,10 @@ void ClipTranscode::slotStartTransCode()
         if (KMessageBox::questionYesNo(this, i18n("File %1 already exists.\nDo you want to overwrite it?", destination + extension)) == KMessageBox::No) return;
         parameters << "-y";
     }
+    foreach (QString s, params.split(' '))
+        parameters << s.replace("%1", destination);
     buttonBox->button(QDialogButtonBox::Abort)->setText(i18n("Abort"));
 
-    parameters << params.split(' ');
-
     //kDebug() << "/// FFMPEG ARGS: " << parameters;
 
     m_transcodeProcess.start("ffmpeg", parameters);