From: Jean-Baptiste Mardelle Date: Fri, 21 Sep 2012 20:18:40 +0000 (+0200) Subject: Fix image clip length increased on reload: X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=f9482a02e7c00d9bc9b3968a84051b493be7f9ca;p=kdenlive Fix image clip length increased on reload: http://kdenlive.org/mantis/view.php?id=2743 --- diff --git a/src/renderer.cpp b/src/renderer.cpp index e947bc79..3b4a8957 100644 --- a/src/renderer.cpp +++ b/src/renderer.cpp @@ -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();