[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60712] trunk/blender/source/blender/ editors/space_clip/clip_editor.c: Fix for prefetch not working correct if last frame was loaded

Sergey Sharybin sergey.vfx at gmail.com
Sat Oct 12 16:47:05 CEST 2013


Revision: 60712
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60712
Author:   nazgul
Date:     2013-10-12 14:47:04 +0000 (Sat, 12 Oct 2013)
Log Message:
-----------
Fix for prefetch not working correct if last frame was loaded

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_clip/clip_editor.c

Modified: trunk/blender/source/blender/editors/space_clip/clip_editor.c
===================================================================
--- trunk/blender/source/blender/editors/space_clip/clip_editor.c	2013-10-12 14:09:05 UTC (rev 60711)
+++ trunk/blender/source/blender/editors/space_clip/clip_editor.c	2013-10-12 14:47:04 UTC (rev 60712)
@@ -710,8 +710,14 @@
 		if (queue->direction > 0) {
 			current_frame = prefetch_find_uncached_frame(clip, queue->current_frame + 1, queue->end_frame,
 			                                             queue->render_size, queue->render_flag, 1);
+			/* switch direction if read frames from current up to scene end frames */
+			if (current_frame >= queue->end_frame) {
+				queue->current_frame = queue->initial_frame;
+				queue->direction = -1;
+			}
 		}
-		else {
+
+		if (queue->direction < 0) {
 			current_frame = prefetch_find_uncached_frame(clip, queue->current_frame - 1, queue->start_frame,
 			                                             queue->render_size, queue->render_flag, -1);
 		}
@@ -736,12 +742,6 @@
 
 			*queue->do_update = 1;
 			*queue->progress = (float)frames_processed / (queue->end_frame - queue->start_frame);
-
-			/* switch direction if read frames from current up to scene end frames */
-			if (current_frame == queue->end_frame) {
-				queue->current_frame = queue->initial_frame;
-				queue->direction = -1;
-			}
 		}
 	}
 	BLI_spin_unlock(&queue->spin);




More information about the Bf-blender-cvs mailing list