X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Frenderer.cpp;h=9ddfd753a69540cc9545ca7c18f83bb52ef1bc37;hb=548782dfe8b4ec1edc0c15f0062f5a976f1c6ee3;hp=90f733b9ebfe8008a3187a8dc351cde4295ad589;hpb=c00630298717b91cc1f4ba9fb3b1961f6ded98e6;p=kdenlive diff --git a/src/renderer.cpp b/src/renderer.cpp index 90f733b9..9ddfd753 100644 --- a/src/renderer.cpp +++ b/src/renderer.cpp @@ -623,8 +623,12 @@ void Render::getFileProperties(const QDomElement xml, const QString &clipId, int } // setup length here as otherwise default length (currently 15000 frames in MLT) will be taken even if outpoint is larger - if (type == COLOR || type == TEXT || type == IMAGE || type == SLIDESHOW) - producer->set("length", xml.attribute("out").toInt() - xml.attribute("in").toInt() + 1); + if (type == COLOR || type == TEXT || type == IMAGE || type == SLIDESHOW) { + int length; + if (xml.hasAttribute("length")) length = xml.attribute("length").toInt(); + else length = xml.attribute("out").toInt() - xml.attribute("in").toInt(); + producer->set("length", length); + } if (xml.hasAttribute("out")) producer->set_in_and_out(xml.attribute("in").toInt(), xml.attribute("out").toInt());