On Tue, Jun 22, 2010 at 12:05:55AM +0300, Mikko Rapeli wrote:
> I got to take this back. Using kdenlive 0.7.7.1 I was able to fix and finish
> the corrupted project without any problems. I'll try to find out the offending
> commit with git bisect.

First of all, thanks for keeping project files compatible between 0.7.7.1 and
latest development tree, and having a git tree available made tracing this
a whole lot easier to me.

I found a dumb way of reproducing the problem somewhat reliably on my project
and after 26 tries this commit is to blame:

git 6b51c6a10ab7a7f8e856e83b157f188a04c749d6
svn 4413

Since reproducing was a bit of a black art I did one run with git bisect
and one manual walk back a few commits to be sure. That commit is pretty big,
so I split it down. The bad piece of code the one below.

As a final wish/whine: please commit changes in smaller logical pieces.
For example git add -p file_with_ton_of_changes.cpp can help to split patches.

diff --git a/src/renderer.cpp b/src/renderer.cpp
index ad5793d..247e913 100644
--- a/src/renderer.cpp
+++ b/src/renderer.cpp
@@ -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 {

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Kdenlive-devel mailing list
Kdenlive-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kdenlive-devel

Reply via email to