Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_clip/clip_editor.c')
-rw-r--r--source/blender/editors/space_clip/clip_editor.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c
index 0d64a3ce594..f5db34d87d7 100644
--- a/source/blender/editors/space_clip/clip_editor.c
+++ b/source/blender/editors/space_clip/clip_editor.c
@@ -710,8 +710,14 @@ static unsigned char *prefetch_thread_next_frame(PrefetchQueue *queue, MovieClip
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 @@ static unsigned char *prefetch_thread_next_frame(PrefetchQueue *queue, MovieClip
*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);