Some small fixes and changes:
[blender.git] / source / blender / blenkernel / intern / sequencer.c
index 6b319e6b5e1444eec79945deafcc80a048cf3c2c..3dcbe036206b752fa285f350390b902aa9158170 100644 (file)
@@ -2505,6 +2505,9 @@ static void *seq_prefetch_thread(void * This_)
 
                for (e = prefetch_done.first; e; e = e->next) {
                        if (s_last > e->monoton_cfra) {
+                               if (e->ibuf) {
+                                       IMB_cache_limiter_unref(e->ibuf);
+                               }
                                BLI_remlink(&prefetch_done, e);
                                MEM_freeN(e);
                        }
@@ -2582,6 +2585,9 @@ static void seq_stop_threads()
        }
 
        for (e = prefetch_done.first; e; e = e->next) {
+               if (e->ibuf) {
+                       IMB_cache_limiter_unref(e->ibuf);
+               }
                BLI_remlink(&prefetch_done, e);
                MEM_freeN(e);
        }