summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <jb@kdenlive.org>2017-07-10 18:39:30 (GMT)
committerJean-Baptiste Mardelle <jb@kdenlive.org>2017-07-10 18:39:30 (GMT)
commit7d719ca8025511a47667eb6497dab7d3ab957aa2 (patch)
treeba2697274eaa898a4ce1e8f1f3353129adaeb63a
parent078dc8d1e00d6ea7ec20245d6b4bb11f9ab4e655 (diff)
Fix crash on importing multistream clipv17.04.3Applications/17.04
BUG: 381584
-rw-r--r--src/mltcontroller/producerqueue.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mltcontroller/producerqueue.cpp b/src/mltcontroller/producerqueue.cpp
index eb8ba2c..e8476e8 100644
--- a/src/mltcontroller/producerqueue.cpp
+++ b/src/mltcontroller/producerqueue.cpp
@@ -624,8 +624,8 @@ void ProducerQueue::processFileProperties()
video_list.append(i);
}
}
-
- if (!info.xml.hasAttribute(QStringLiteral("video_index")) && video_list.count() > 1) {
+ int bypass = EffectsList::property(info.xml, QStringLiteral("bypassDuplicate")).toInt();
+ if (!info.xml.hasAttribute(QStringLiteral("video_index")) && video_list.count() > 1 && bypass != 1) {
// Clip has more than one video stream, ask which one should be used
QMap<QString, QString> data;
if (info.xml.hasAttribute(QStringLiteral("group"))) {
@@ -982,7 +982,12 @@ void ProducerQueue::slotMultiStreamProducerFound(const QString &path, const QLis
for (int i = 0; i < groupList.count(); ++i) {
if (groupList.at(i)->isChecked()) {
int vindex = groupList.at(i)->property("vindex").toInt();
- int aindex = comboList.at(i)->itemData(comboList.at(i)->currentIndex()).toInt();
+ int ax = qMin(i, comboList.size() - 1);
+ int aindex = -1;
+ if (ax >= 0) {
+ // only check audio index if we have several audio streams
+ aindex = comboList.at(ax)->itemData(comboList.at(ax)->currentIndex()).toInt();
+ }
data.insert(QStringLiteral("kdenlive-force.video_index"), QString::number(vindex));
data.insert(QStringLiteral("kdenlive-force.audio_index"), QString::number(aindex));
data.insert(QStringLiteral("bypassDuplicate"), QStringLiteral("1"));