aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <[email protected]>2015-07-31 00:41:39 +0200
committerJean-Baptiste Mardelle <[email protected]>2015-07-31 00:42:49 +0200
commita34208118506ee5b72bde6e7e2aa5e3a031df97b (patch)
tree8c90636275b3cfbc8fa81f95eeeef5b7551944d6
parent42d7f8cfc5cddc934586f8e550ed85221daf3a4d (diff)
Fix crash in transcoding dialog
-rw-r--r--src/project/cliptranscode.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/project/cliptranscode.cpp b/src/project/cliptranscode.cpp
index e2fdd32..6efbab5 100644
--- a/src/project/cliptranscode.cpp
+++ b/src/project/cliptranscode.cpp
@@ -151,19 +151,21 @@ void ClipTranscode::slotStartTransCode()
}
bool replaceVfParams = false;
- foreach(QString s, params.split(' ')) {
+ QStringList splitted = params.split(' ');
+ foreach(QString s, splitted) {
if (replaceVfParams) {
- s= m_postParams.at(1);
+ parameters << m_postParams.at(1);
replaceVfParams = false;
} else if (s.startsWith(QLatin1String("%1"))) {
parameters << s.replace(0, 2, destination);
- } else if (s == "-vf") {
+ } else if (!m_postParams.isEmpty() && s == "-vf") {
replaceVfParams = true;
+ parameters << s;
+ } else {
+ parameters << s;
}
}
-
buttonBox->button(QDialogButtonBox::Abort)->setText(i18n("Abort"));
-
m_destination = destination + extension;
m_transcodeProcess.start(KdenliveSettings::ffmpegpath(), parameters);
source_url->setEnabled(false);