]> git.sesse.net Git - kdenlive/commitdiff
Fix pasting fade out effect loses 1 frame: http://www.kdenlive.org/mantis/view.php...
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Wed, 26 Dec 2012 00:04:46 +0000 (01:04 +0100)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Wed, 26 Dec 2012 00:04:46 +0000 (01:04 +0100)
src/customtrackview.cpp

index 01274517a8aa2b7c74db17288f38b07a016498c0..d1c81c33ff03becf609dfd75a2b171642417585a 100644 (file)
@@ -5186,7 +5186,7 @@ void CustomTrackView::updatePositionEffects(ClipItem* item, ItemInfo info, bool
         if (effectPos != -1) {
             QDomElement effect = item->getEffectAtIndex(effectPos);
             int max = item->cropDuration().frames(m_document->fps());
-            int end = max + item->cropStart().frames(m_document->fps());
+            int end = max + item->cropStart().frames(m_document->fps()) - 1;
             if (start > max) {
                 // Make sure the fade effect is not longer than the clip
                 item->setFadeOut(max);
@@ -5207,7 +5207,7 @@ void CustomTrackView::updatePositionEffects(ClipItem* item, ItemInfo info, bool
         if (effectPos != -1) {
             QDomElement effect = item->getEffectAtIndex(effectPos);
             int max = item->cropDuration().frames(m_document->fps());
-            int end = max + item->cropStart().frames(m_document->fps());
+            int end = max + item->cropStart().frames(m_document->fps()) - 1;
             if (start > max) {
                 // Make sure the fade effect is not longer than the clip
                 item->setFadeOut(max);