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:41:39 +0200
commit73aa82d1c169f44185e769954aa66db9e5335006 (patch)
treedde5a3c50080724fdfe475102d72cf9dd2c46d70
parented60db7b62107b2c887f265904498ecd7f33fa64 (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);