]> git.sesse.net Git - kdenlive/blobdiff - src/renderwidget.cpp
Revert commit 5845. The consumer producer does not automatically get invoked.
[kdenlive] / src / renderwidget.cpp
index bb19f875372f8c3bcc1db4517c1a750eba9a4c4c..e4b6b9eaa4e086d3f8909c413aa6846b9947ed01 100644 (file)
@@ -791,6 +791,7 @@ void RenderWidget::slotExport(bool scriptExport, int zoneIn, int zoneOut, const
         // Add current size parameter
         renderArgs.append(subsize);
     }
+    bool resizeProfile = (subsize != currentSize);
     QStringList paramsList = renderArgs.split(" ", QString::SkipEmptyParts);
 
     QScriptEngine sEngine;
@@ -801,6 +802,10 @@ void RenderWidget::slotExport(bool scriptExport, int zoneIn, int zoneOut, const
     for (int i = 0; i < paramsList.count(); ++i) {
         QString paramName = paramsList.at(i).section('=', 0, 0);
         QString paramValue = paramsList.at(i).section('=', 1, 1);
+        // If the profiles do not match we need to use the consumer tag
+        if (paramName == "mlt_profile=" && paramValue != m_profile.path) {
+            resizeProfile = true;
+        }
         // evaluate expression
         if (paramValue.startsWith('%')) {
             paramValue = sEngine.evaluate(paramValue.remove(0, 1)).toString();
@@ -809,7 +814,10 @@ void RenderWidget::slotExport(bool scriptExport, int zoneIn, int zoneOut, const
         sEngine.globalObject().setProperty(paramName.toUtf8().constData(), paramValue);
     }
 
-    render_process_args <<  (scriptExport ? "$SOURCE" : playlistPath);
+    if (resizeProfile)
+        render_process_args << "consumer:" + (scriptExport ? "$SOURCE" : playlistPath);
+    else
+        render_process_args <<  (scriptExport ? "$SOURCE" : playlistPath);
     render_process_args << (scriptExport ? "$TARGET" : KUrl(dest).url());
     render_process_args << paramsList;