]> git.sesse.net Git - kdenlive/blobdiff - src/renderer.cpp
Fix "save zone" saving proxy instead of real clip:
[kdenlive] / src / renderer.cpp
index 3e18730174c408034b15898a708d2a7d5a72019b..fd6a48585b89985b35ce3a64613e5b40d9b96545 100644 (file)
@@ -185,7 +185,6 @@ void Render::buildConsumer(const QString profileName)
 {
     m_activeProfile = profileName;
     char *tmp = qstrdup(m_activeProfile.toUtf8().constData());
-    setenv("MLT_PROFILE", tmp, 1);
     delete m_blackClip;
     m_blackClip = NULL;
 
@@ -194,7 +193,7 @@ void Render::buildConsumer(const QString profileName)
     if (m_mltProfile) delete m_mltProfile;
 
     m_mltProfile = new Mlt::Profile(tmp);
-    m_mltProfile->get_profile()->is_explicit = 1;
+    m_mltProfile->set_explicit(true);
     delete[] tmp;
 
     m_blackClip = new Mlt::Producer(*m_mltProfile, "colour", "black");
@@ -343,7 +342,7 @@ int Render::resetProfile(const QString profileName)
     //kDebug() << "//RESET WITHSCENE: " << scene;
     setSceneList(scene, pos);
     // producers have changed (different profile), so reset them...
-    emit refreshDocumentProducers(new_dar != current_dar);
+    emit refreshDocumentProducers(new_dar != current_dar, current_fps != new_fps);
     /*Mlt::Producer *producer = new Mlt::Producer(*m_mltProfile , "xml-string", scene.toUtf8().constData());
     m_mltProducer = producer;
     m_blackClip = new Mlt::Producer(*m_mltProfile , "colour", "black");
@@ -576,7 +575,6 @@ void Render::getFileProperties(const QDomElement xml, const QString &clipId, int
         proxyProducer = false;
     }
 
-
     KUrl url = KUrl(path);
     Mlt::Producer *producer = NULL;
     CLIPTYPE type = (CLIPTYPE)xml.attribute("type").toInt();
@@ -617,6 +615,7 @@ void Render::getFileProperties(const QDomElement xml, const QString &clipId, int
     }
 
     if (proxyProducer && xml.hasAttribute("proxy_out")) {
+        producer->set("length", xml.attribute("proxy_out").toInt() + 1);
         producer->set("out", xml.attribute("proxy_out").toInt());
         if (producer->get_out() != xml.attribute("proxy_out").toInt()) {
             // Proxy file length is different than original clip length, this will corrupt project so disable this proxy clip
@@ -4022,7 +4021,7 @@ void Render::mltDeleteTrack(int ix)
     tractor.removeChild(track);
     //kDebug() << "/////////// RESULT SCENE: \n" << doc.toString();
     setSceneList(doc.toString(), m_framePosition);
-    emit refreshDocumentProducers(false);
+    emit refreshDocumentProducers(false, false);
 }