Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2014-07-22 00:55:06 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-07-22 00:55:06 +0400
commit2e436173aae1ff715eb1d19aebbf7243ba4afc5c (patch)
treee82b4c7fdae8b77548456dc73aa288af61e21769 /source/blender/editors/space_sequencer
parent86059f03eb60bf3d37e8501ef278d4b090a86ae6 (diff)
Fix T41086: VSE separate images increases file size abnormally.
We were copying everything from the old sequence into each new ones... including the stripdata, which for image sequences is an array with one item per image! So bug was an exponential one, separating strips of a few tens of images was insensible, while separating a strip of 1000 images would add above 250MB to file size (and RAM usage too)!
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 973d6a97a11..dcf13dbf43f 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -1919,9 +1919,12 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op)
strip_new = seq_new->strip;
strip_new->us = 1;
- /* new stripdata */
- se_new = strip_new->stripdata;
+ /* new stripdata (only one element now!) */
+ /* Note this assume all elements (images) have the same dimension, since we only copy the name here. */
+ se_new = MEM_reallocN(strip_new->stripdata, sizeof(*se_new));
BLI_strncpy(se_new->name, se->name, sizeof(se_new->name));
+ strip_new->stripdata = se_new;
+
BKE_sequence_calc(scene, seq_new);
if (step > 1) {