]> git.sesse.net Git - kdenlive/blobdiff - src/renderer.cpp
Try to correctly fix issue resize start issue:
[kdenlive] / src / renderer.cpp
index ad5793da9478d645a083bb564cab4fab14023494..247e91337857755812bb2dc5baec34861522c5a4 100644 (file)
@@ -2750,17 +2750,15 @@ bool Render::mltResizeClipStart(ItemInfo info, GenTime diff)
     }
     mlt_service_lock(service.get_service());
     int clipIndex = trackPlaylist.get_clip_index_at(info.startPos.frames(m_fps));
-    Mlt::Producer *clip = trackPlaylist.get_clip(clipIndex);
-    if (clip == NULL) {
+    if (trackPlaylist.is_blank(clipIndex)) {
         kDebug() << "////////  ERROR RSIZING NULL CLIP!!!!!!!!!!!";
         mlt_service_unlock(service.get_service());
         return false;
     }
-    int previousStart = clip->get_in();
-    delete clip;
+    int previousStart = trackPlaylist.clip_start(clipIndex);
     int previousDuration = trackPlaylist.clip_length(clipIndex) - 1;
     m_isBlocked = true;
-    kDebug() << "RESIZE, old start: " << previousStart << ", PREV DUR: " << previousDuration << ", DIFF: " << moveFrame;
+    kDebug() << "RESIZE, old start: " << previousStart + moveFrame<<", "<<previousStart + previousDuration;
     trackPlaylist.resize_clip(clipIndex, previousStart + moveFrame, previousStart + previousDuration);
     if (moveFrame > 0) trackPlaylist.insert_blank(clipIndex, moveFrame - 1);
     else {