From f4677547d430cd16a386094626cbafa23e199ca8 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 4 Mar 2019 15:22:14 +0100 Subject: Fix early output check in movie clip prefetch Was preventing prefetching when clip is offset to a higher scene frame number than a duration of the clip. --- source/blender/editors/space_clip/clip_editor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_clip/clip_editor.c') diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c index f6959dd593c..6d4fd927d76 100644 --- a/source/blender/editors/space_clip/clip_editor.c +++ b/source/blender/editors/space_clip/clip_editor.c @@ -958,8 +958,9 @@ static int prefetch_get_final_frame(const bContext *C) /* check whether all the frames from prefetch range are cached */ end_frame = EFRA; - if (clip->len) - end_frame = min_ii(end_frame, clip->len); + if (clip->len) { + end_frame = min_ii(end_frame, SFRA + clip->len - 1); + } return end_frame; } -- cgit v1.2.3