diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2021-10-05 19:49:45 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2021-10-05 19:57:15 +0300 |
commit | ebb81050c588bb39a3adf8664bc04f04382a02cb (patch) | |
tree | e0d8c535508eb4276bbd3b73affe79ed2ad01a26 /source/blender/sequencer/intern/render.c | |
parent | 02fd9c2ea4a08848514e8aae955d866479042161 (diff) |
VSE: Free animation strip data if they are not visible
Previously we would only free animation strip data when doing final
renders. If not doing a final render or simply just playing back videos
in the VSE, we would not free decoders or non VSE cache data from the
strips.
This would lead to memory usage exploding in complex VSE scenes.
Now we instead use the dumb apporach of freeing everything that is not
currently visible.
Diffstat (limited to 'source/blender/sequencer/intern/render.c')
-rw-r--r-- | source/blender/sequencer/intern/render.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c index 6c4502a3608..41fb640a407 100644 --- a/source/blender/sequencer/intern/render.c +++ b/source/blender/sequencer/intern/render.c @@ -69,6 +69,7 @@ #include "SEQ_iterator.h" #include "SEQ_modifier.h" #include "SEQ_proxy.h" +#include "SEQ_relations.h" #include "SEQ_render.h" #include "SEQ_sequencer.h" #include "SEQ_time.h" @@ -1950,6 +1951,8 @@ ImBuf *SEQ_render_give_ibuf(const SeqRenderData *context, float timeline_frame, } seq_cache_free_temp_cache(context->scene, context->task_id, timeline_frame); + /* Make sure we only keep the `anim` data for strips that are in view. */ + SEQ_relations_free_all_anim_ibufs(context->scene, timeline_frame); if (count && !out) { BLI_mutex_lock(&seq_render_mutex); |