Skip to content
Snippets Groups Projects
Commit c688b038 authored by Bastien Montagne's avatar Bastien Montagne
Browse files

Fix (studio-reported) VSE prefetch process taking seconds to stop.

When VSE cache is invalidated (on most VSE edit operation e.g.), or
Blender quits, in some cases (complex and very long edits), the
prefetch job would block several seconds after being requested to stop.

This was because one codepath would keep looping over all frames without
checking for the `stop` flag.
parent ab2198d7
Branches
Tags
No related merge requests found
......@@ -500,6 +500,10 @@ static void *seq_prefetch_frames(void *job)
ListBase *channels = SEQ_channels_displayed_get(SEQ_editing_get(pfjob->scene_eval));
if (seq_prefetch_must_skip_frame(pfjob, channels, seqbase)) {
pfjob->num_frames_prefetched++;
/* Break instead of keep looping if the job should be terminated. */
if (!(pfjob->scene->ed->cache_flag & SEQ_CACHE_PREFETCH_ENABLE) || pfjob->stop) {
break;
}
continue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment