]> git.sesse.net Git - kdenlive/blobdiff - src/projectlist.cpp
Fix proxy clips for playlists distortion
[kdenlive] / src / projectlist.cpp
index e0ff8d2a3a8f3ff45164fc6003096690147d17fe..d60e3081db98577306709b5a425629c4e1a0344e 100644 (file)
@@ -2724,8 +2724,12 @@ void ProjectList::slotCreateProxy(const QString id)
         slotGotProxy(path);
         return;
     }
-
-    ProxyJob *job = new ProxyJob(item->clipType(), id, QStringList() << path << item->clipUrl().path() << item->referencedClip()->producerProperty("_exif_orientation") << m_doc->getDocumentProperty("proxyparams").simplified() << QString::number(m_render->frameRenderWidth()) << QString::number(m_render->renderHeight()));
+    QString sourcePath = item->clipUrl().path();
+    if (item->clipType() == PLAYLIST) {
+       // Special case: playlists use the special 'consumer' producer to support resizing
+       sourcePath.prepend("consumer:");
+    }
+    ProxyJob *job = new ProxyJob(item->clipType(), id, QStringList() << path << sourcePath << item->referencedClip()->producerProperty("_exif_orientation") << m_doc->getDocumentProperty("proxyparams").simplified() << QString::number(m_render->frameRenderWidth()) << QString::number(m_render->renderHeight()));
     if (job->isExclusive() && hasPendingJob(item, job->jobType)) {
         delete job;
         return;
@@ -3462,15 +3466,17 @@ void ProjectList::processClipJob(QStringList ids, const QString&destination, boo
     foreach(const QString&id, ids) {
         ProjectItem *item = getItemById(id);
         if (!item) continue;
+       QStringList jobArgs;
+       jobArgs << preParams;
         if (ids.count() == 1) {
-            consumer += ':' + destination;
+            jobArgs << consumer + ':' + destination;
         }
         else {
-            consumer += ':' + destination + item->clipUrl().fileName() + ".mlt";
+            jobArgs << consumer + ':' + destination + item->clipUrl().fileName() + ".mlt";
         }
-        preParams << consumer << jobParams;
+        jobArgs << jobParams;
         
-        MeltJob *job = new MeltJob(item->clipType(), id, preParams);
+        MeltJob *job = new MeltJob(item->clipType(), id, jobArgs);
         if (autoAdd) {
             job->setAddClipToProject(true);
             kDebug()<<"// ADDING TRUE";