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:
authorPeter Schlaile <peter@schlaile.de>2011-05-16 21:54:55 +0400
committerPeter Schlaile <peter@schlaile.de>2011-05-16 21:54:55 +0400
commitff884f4179a1371e40b6fe255cbff616dd1b6c47 (patch)
tree5106b56b976ed1fb59c5819b70ed14412eba6bbf /source/blender/blenkernel/intern/sequencer.c
parent70b832589a2bb90fbed2106f30d34d77f49d2010 (diff)
== Sequencer ==
This fixes one part of [#27353] VSE crashes on large M4V StripData was alloced in full length for MOVIE and SOUND-tracks, which only use the first element for filename storage. (StripData as an array is only used in IMAGE strips). Fixed the crash and documented accordingly.
Diffstat (limited to 'source/blender/blenkernel/intern/sequencer.c')
-rw-r--r--source/blender/blenkernel/intern/sequencer.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index b0da40bf0c5..fb72ab676b0 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -1003,7 +1003,11 @@ StripElem *give_stripelem(Sequence *seq, int cfra)
{
StripElem *se= seq->strip->stripdata;
- if(seq->type != SEQ_MOVIE) { /* movie use the first */
+ if(seq->type == SEQ_IMAGE) { /* only
+ IMAGE strips use the whole array,
+ MOVIE strips use only
+ the first element, all other strips
+ don't use this... */
int nr = (int) give_stripelem_index(seq, cfra);
if (nr == -1 || se == NULL) return NULL;
@@ -3505,7 +3509,8 @@ Sequence *sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo
strip->len = seq->len = ceil(info.length * FPS);
strip->us= 1;
- strip->stripdata= se= MEM_callocN(seq->len*sizeof(StripElem), "stripelem");
+ /* we only need 1 element to store the filename */
+ strip->stripdata= se= MEM_callocN(sizeof(StripElem), "stripelem");
BLI_split_dirfile(seq_load->path, strip->dir, se->name);
@@ -3554,7 +3559,8 @@ Sequence *sequencer_add_movie_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo
strip->len = seq->len = IMB_anim_get_duration( an );
strip->us= 1;
- strip->stripdata= se= MEM_callocN(seq->len*sizeof(StripElem), "stripelem");
+ /* we only need 1 element for MOVIE strips */
+ strip->stripdata= se= MEM_callocN(sizeof(StripElem), "stripelem");
BLI_split_dirfile(seq_load->path, strip->dir, se->name);