Clip editor: Fixes for prefetch

Seems metadata was never read while prefetching, at least was
never requested to be read.

Also fixed prefetch for multilayer EXR.
This commit is contained in:
2019-02-05 16:50:57 +01:00
parent 3467e40e01
commit 08ab09cf04
3 changed files with 21 additions and 10 deletions

View File

@@ -773,7 +773,7 @@ static void prefetch_task_func(TaskPool * __restrict pool, void *task_data, int
while ((mem = prefetch_thread_next_frame(queue, clip, &size, &current_frame))) {
ImBuf *ibuf;
MovieClipUser user = {0};
int flag = IB_rect | IB_alphamode_detect;
int flag = IB_rect | IB_multilayer | IB_alphamode_detect | IB_metadata;
int result;
char *colorspace_name = NULL;
const bool use_proxy = (clip->flag & MCLIP_USE_PROXY) &&
@@ -789,6 +789,10 @@ static void prefetch_task_func(TaskPool * __restrict pool, void *task_data, int
}
ibuf = IMB_ibImageFromMemory(mem, size, flag, colorspace_name, "prefetch frame");
if (ibuf == NULL) {
continue;
}
BKE_movieclip_convert_multilayer_ibuf(ibuf);
result = BKE_movieclip_put_frame_if_possible(clip, &user, ibuf);