]> git.sesse.net Git - kdenlive/commitdiff
Fix image clip length increased on reload:
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Fri, 21 Sep 2012 20:18:40 +0000 (22:18 +0200)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Fri, 21 Sep 2012 20:18:40 +0000 (22:18 +0200)
http://kdenlive.org/mantis/view.php?id=2743

src/renderer.cpp

index e947bc79e756fc24f41cfa190db3ebaf19b5ca31..3b4a8957ab7d607f007e18ce966b92b54a07e2bd 100644 (file)
@@ -777,12 +777,12 @@ void Render::processFileProperties()
         if (type == COLOR || type == TEXT || type == IMAGE || type == SLIDESHOW) {
             int length;
             if (info.xml.hasAttribute("length")) {
-                if (clipOut > 0) duration = clipOut + 1;
                 length = info.xml.attribute("length").toInt();
                 clipOut = length - 1;
             }
             else length = info.xml.attribute("out").toInt() - info.xml.attribute("in").toInt();
             producer->set("length", length);
+           duration = length;
         }
 
         if (clipOut > 0) producer->set_in_and_out(info.xml.attribute("in").toInt(), clipOut);
@@ -818,7 +818,6 @@ void Render::processFileProperties()
         char property[200];
 
         if (frameNumber > 0) producer->seek(frameNumber);
-
         duration = duration > 0 ? duration : producer->get_playtime();
         filePropertyMap["duration"] = QString::number(duration);
         //kDebug() << "///////  PRODUCER: " << url.path() << " IS: " << producer->get_playtime();
@@ -1224,7 +1223,6 @@ int Render::setSceneList(QString playlist, int position)
 
     blockSignals(true);
     m_locale = QLocale();
-
     m_mltProducer = new Mlt::Producer(*m_mltProfile, "xml-string", playlist.toUtf8().constData());
     if (!m_mltProducer || !m_mltProducer->is_valid()) {
         kDebug() << " WARNING - - - - -INVALID PLAYLIST: " << playlist.toUtf8().constData();