]> git.sesse.net Git - kdenlive/commitdiff
Remove checks for inpoint < 0. Not needed anymore.
authorTill Theato <root@ttill.de>
Thu, 30 Sep 2010 16:35:12 +0000 (16:35 +0000)
committerTill Theato <root@ttill.de>
Thu, 30 Sep 2010 16:35:12 +0000 (16:35 +0000)
svn path=/trunk/kdenlive/; revision=4958

src/clipitem.cpp
src/renderer.cpp

index c346cc49571e4b3234fed9c061138d12b90cef23..b5791614e831521330c41372cb969fc936ae16dc 100644 (file)
@@ -1422,14 +1422,8 @@ EffectsParameterList ClipItem::addEffect(const QDomElement effect, bool /*animat
 
     // special case: the affine effect needs in / out points
     if (effectId == "pan_zoom") {
-        int start = cropStart().frames(m_fps);
-        int end = (cropStart() + cropDuration()).frames(m_fps);
-        if (start < 0) {
-            end -= start;
-            start = 0;
-        }
-        parameters.addParam("in", QString::number(start));
-        parameters.addParam("out", QString::number(end));
+        parameters.addParam("in", QString::number(cropStart().frames(m_fps)));
+        parameters.addParam("out", QString::number((cropStart() + cropDuration()).frames(m_fps)));
     }
 
     QDomNodeList params = effect.elementsByTagName("parameter");
@@ -1792,10 +1786,6 @@ QList <int> ClipItem::updatePanZoom(int width, int height, int cut)
 
                 int in = cropStart().frames(fps());
                 int out = in + cropDuration().frames(fps());
-                if (in < 0) {
-                    out -= in;
-                    in = 0;
-                }
                 int dur = out - in - 1;
 
                 effect.setAttribute("in", in);
index 94f8dcd90945737d63d21946565c4f05da433d74..1cfec82f495283774efda6f405f764c39131a557 100644 (file)
@@ -2801,11 +2801,7 @@ bool Render::mltResizeClipEnd(ItemInfo info, GenTime clipDuration)
     int newDuration = (int) clipDuration.frames(m_fps) - 1;
     int diff = newDuration - (trackPlaylist.clip_length(clipIndex) - 1);
 
-    int currentOut;
-    if (info.cropStart < GenTime())
-        currentOut = newDuration - info.cropStart.frames(m_fps);
-    else
-        currentOut = newDuration + previousStart;
+    int currentOut = newDuration + previousStart;
     if (currentOut > clip->get_length()) {
         clip->parent().set("length", currentOut + 1);
         clip->parent().set("out", currentOut);
@@ -2933,11 +2929,6 @@ bool Render::mltResizeClipStart(ItemInfo info, GenTime diff)
 
     m_isBlocked = true;
     previousStart += moveFrame;
-    if (previousStart < 0) {
-        // special case, in point becoming negative (resizing images)
-        previousOut -= previousStart;
-        previousStart = 0;
-    }
 
     int length = previousOut + 1;
     if (length > clip->get_length()) {
@@ -2959,8 +2950,10 @@ bool Render::mltResizeClipStart(ItemInfo info, GenTime diff)
         if (! trackPlaylist.is_blank(blankIndex)) {
             kDebug() << "WARNING, CLIP TO RESIZE IS NOT BLANK";
         }
-        if (blankLength + moveFrame == 0) trackPlaylist.remove(blankIndex);
-        else trackPlaylist.resize_clip(blankIndex, 0, blankLength + moveFrame - 1);
+        if (blankLength + moveFrame == 0)
+            trackPlaylist.remove(blankIndex);
+        else
+            trackPlaylist.resize_clip(blankIndex, 0, blankLength + moveFrame - 1);
     }
     trackPlaylist.consolidate_blanks(0);
     /*if (QString(clip->parent().get("transparency")).toInt() == 1) {