From: Jean-Baptiste Mardelle Date: Thu, 28 May 2009 21:36:04 +0000 (+0000) Subject: Don't double check max length when resizing clip end X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=c95a41b4c6dcdeb07f17661cb4a2ce3154cc0f67;p=kdenlive Don't double check max length when resizing clip end svn path=/trunk/kdenlive/; revision=3438 --- diff --git a/src/abstractclipitem.cpp b/src/abstractclipitem.cpp index 370a781b..07e6a54a 100644 --- a/src/abstractclipitem.cpp +++ b/src/abstractclipitem.cpp @@ -148,9 +148,6 @@ void AbstractClipItem::resizeEnd(int posx, double speed, bool /*updateKeyFrames* //kDebug() << "// DUR DIFF1:" << durationDiff.frames(25) << ", ADJUSTED: " << durationDiff.frames(25) * speed << ", SPED:" << speed; if (cropDuration() + durationDiff <= GenTime()) { durationDiff = GenTime() - (cropDuration() - GenTime(3, m_fps)); - } else if (type() == AVWIDGET && (cropStart() + cropDuration() + durationDiff >= maxDuration())) { - //kDebug() << "// MAX OVERLOAD:" << cropDuration().frames(25) << " + " << durationDiff.frames(25) << ", MAX:" << maxDuration().frames(25); - durationDiff = maxDuration() - cropDuration() - cropStart(); } //kDebug() << "// DUR DIFF2:" << durationDiff.frames(25) << ", ADJUSTED: " << durationDiff.frames(25) * speed << ", SPED:" << speed; m_cropDuration += durationDiff * speed; diff --git a/src/clipitem.cpp b/src/clipitem.cpp index db222a1d..4f93bef4 100644 --- a/src/clipitem.cpp +++ b/src/clipitem.cpp @@ -1105,7 +1105,7 @@ void ClipItem::resizeStart(int posx, double /*speed*/) void ClipItem::resizeEnd(int posx, double /*speed*/, bool updateKeyFrames) { - const int max = (startPos() - cropStart() + maxDuration()).frames(m_fps) + 1; + const int max = (startPos() - cropStart() + maxDuration()).frames(m_fps); if (posx > max) posx = max; if (posx == endPos().frames(m_fps)) return; //kDebug() << "// NEW POS: " << posx << ", OLD END: " << endPos().frames(m_fps);