]> git.sesse.net Git - kdenlive/blobdiff - src/projectlist.cpp
Cleanup & fix multi clip transcoding
[kdenlive] / src / projectlist.cpp
index 201e2cfd4221ee2949f855cc3dbefe70300bd107..abe5881b388504dd22e77abf730b44d877b5d1f4 100644 (file)
@@ -2111,12 +2111,12 @@ void ProjectList::slotRefreshClipThumbnail(QTreeWidgetItem *it, bool update)
         int dwidth = (int)(height  * m_render->dar() + 0.5);
         if (clip->clipType() == AUDIO)
             pix = KIcon("audio-x-generic").pixmap(QSize(dwidth, height));
-        else if (clip->clipType() == IMAGE)
+        else if (clip->clipType() == IMAGE) {
             img = KThumb::getFrame(item->referencedClip()->getProducer(), 0, swidth, dwidth, height);
+       }
         else {
             img = item->referencedClip()->extractImage(frame, dwidth, height);
         }
-
         if (!pix.isNull() || !img.isNull()) {
             monitorItemEditing(false);
             if (!img.isNull()) {
@@ -2852,13 +2852,16 @@ void ProjectList::slotTranscodeClipJob(const QString &condition, QString params,
     }
     params = ui.extra_params->toPlainText().simplified();
     KdenliveSettings::setAdd_clip_cut(ui.add_clip->isChecked());
-    
+    int index = 0;
     foreach(const QString &id, ids) {
         ProjectItem *item = getItemById(id);
         if (!item || !item->referencedClip()) continue;
         QString src = item->clipUrl().path();
         QString dest;
-        if (ids.count() > 1) dest = params.section(' ', -1).replace("%1", src);
+        if (ids.count() > 1) {
+           dest = destinations.at(index);
+           index++;
+       }
         else dest = ui.file_url->url().path();
         QStringList jobParams;
         jobParams << dest << src << QString() << QString();