diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-03-11 14:32:30 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-03-11 14:34:37 +0300 |
commit | f4c8b4eb3e309ebc043cd998faa6d8d2bada14ac (patch) | |
tree | dbd51cad9fc787a6da9b57e0422d5d9af854b0c1 /source/blender/blenkernel | |
parent | f6564df3515fcabfdb18cbff9b2e1a1579430848 (diff) |
Fix threading conflict with movie cache line
It was possible that a render thread will be freeing cache while the
interface is iterating over cache items to build cache line.
Found while looking into T94738. It might be a fix, but I am unable
to reproduce the original issue, so can not know for sure whether
there is something else going or or not.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/movieclip.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index a53714c8a98..c23110b4703 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -1609,8 +1609,10 @@ void BKE_movieclip_get_cache_segments(MovieClip *clip, if (clip->cache) { int proxy = rendersize_to_proxy(user, clip->flag); + BLI_thread_lock(LOCK_MOVIECLIP); IMB_moviecache_get_cache_segments( clip->cache->moviecache, proxy, user->render_flag, r_totseg, r_points); + BLI_thread_unlock(LOCK_MOVIECLIP); } } |