diff options
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r-- | source/blender/editors/space_clip/clip_editor.c | 8 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_ops.c | 5 |
2 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c index 0543e348b5b..18652aabefe 100644 --- a/source/blender/editors/space_clip/clip_editor.c +++ b/source/blender/editors/space_clip/clip_editor.c @@ -765,12 +765,18 @@ static void *do_prefetch_thread(void *data_v) MovieClipUser user = {0}; int flag = IB_rect | IB_alphamode_detect; int result; + char *colorspace_name = NULL; user.framenr = current_frame; user.render_size = data->queue->render_size; user.render_flag = data->queue->render_flag; - ibuf = IMB_ibImageFromMemory(mem, size, flag, clip->colorspace_settings.name, "prefetch frame"); + /* Proxies are stored in the display space. */ + if (data->queue->render_flag & MCLIP_USE_PROXY) { + colorspace_name = clip->colorspace_settings.name; + } + + ibuf = IMB_ibImageFromMemory(mem, size, flag, colorspace_name, "prefetch frame"); result = BKE_movieclip_put_frame_if_possible(data->clip, &user, ibuf); diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index 7a6c4268aab..bb6c50d6224 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -1002,7 +1002,7 @@ static void do_movie_proxy(void *pjv, int *UNUSED(build_sizes), int UNUSED(build } else { sfra = 1; - efra = IMB_anim_get_duration(clip->anim, IMB_TC_NONE); + efra = clip->len; } if (build_undistort_count) { @@ -1118,7 +1118,8 @@ static void *do_proxy_thread(void *data_v) while ((mem = proxy_thread_next_frame(data->queue, data->clip, &size, &cfra))) { ImBuf *ibuf; - ibuf = IMB_ibImageFromMemory(mem, size, IB_rect | IB_multilayer | IB_alphamode_detect, NULL, "proxy frame"); + ibuf = IMB_ibImageFromMemory(mem, size, IB_rect | IB_multilayer | IB_alphamode_detect, + data->clip->colorspace_settings.name, "proxy frame"); BKE_movieclip_build_proxy_frame_for_ibuf(data->clip, ibuf, NULL, cfra, data->build_sizes, data->build_count, false); |