diff options
author | Peter Schlaile <peter@schlaile.de> | 2006-11-17 00:36:04 +0300 |
---|---|---|
committer | Peter Schlaile <peter@schlaile.de> | 2006-11-17 00:36:04 +0300 |
commit | 1a36a9080c16a3fc25d0349a04a626bd94cc80f8 (patch) | |
tree | ec93fbcf290a5a3b8097470ded0769ed9329d432 | |
parent | 85615f7ac865c98a500c5653fea0dbcfd654a59d (diff) |
== Sequencer ==
Fixes Bug #5239 reported by Anders Gudmundson:
- Sequencer eats memory like popcorn with metastrips
- Crash on gaps in metastrips
Both were introduces by my last patch that added "Speed Control".
I also forgot to add "Speed Control" and "Color" to the "Add"-menu.
(Simply haven't noticed, I use the spacebar all the time...)
-rw-r--r-- | source/blender/src/header_seq.c | 9 | ||||
-rw-r--r-- | source/blender/src/sequence.c | 10 |
2 files changed, 18 insertions, 1 deletions
diff --git a/source/blender/src/header_seq.c b/source/blender/src/header_seq.c index 4f38650a5fd..0b6cdb4f14f 100644 --- a/source/blender/src/header_seq.c +++ b/source/blender/src/header_seq.c @@ -235,6 +235,12 @@ static void do_seq_addmenu_effectmenu(void *arg, int event) case 11: add_sequence(SEQ_TRANSFORM); break; + case 12: + add_sequence(SEQ_COLOR); + break; + case 13: + add_sequence(SEQ_SPEED); + break; } } @@ -257,6 +263,9 @@ static uiBlock *seq_addmenu_effectmenu(void *arg_unused) uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Wipe", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 9, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Glow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 10, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Transform", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 11, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Transform", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 11, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Color Generator", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 12, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Speed Control", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 13, ""); uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Plugin...", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 8, ""); diff --git a/source/blender/src/sequence.c b/source/blender/src/sequence.c index 6dabe9f2fec..dd478f70387 100644 --- a/source/blender/src/sequence.c +++ b/source/blender/src/sequence.c @@ -955,6 +955,7 @@ static void do_build_seq_recursively_impl(Sequence * seq, int cfra) se = seq->curelem = give_stripelem(seq, cfra); if(se) { + int unref_meta = FALSE; if(seq->seqbase.first) { Sequence * seqmshown= get_shown_seq_from_metastrip(seq, cfra); if (seqmshown) { @@ -963,6 +964,8 @@ static void do_build_seq_recursively_impl(Sequence * seq, int cfra) else if(cfra> seq->start+seq->len-1) do_build_seq_recursively(seqmshown, seq->start + seq->len-1); else do_build_seq_recursively(seqmshown, cfra); + + unref_meta = TRUE; } } @@ -971,6 +974,10 @@ static void do_build_seq_recursively_impl(Sequence * seq, int cfra) } else { do_build_seq_ibuf(seq, cfra); } + + if(unref_meta && seq->curelem->ibuf) { + IMB_cache_limiter_unref(seq->curelem->ibuf); + } } } @@ -1141,8 +1148,9 @@ ImBuf *give_ibuf_seq(int rectx, int recty, int cfra, int chanshown) return 0; } - if(seqfirst->curelem->ibuf) + if (seqfirst->curelem->ibuf) { IMB_cache_limiter_unref(seqfirst->curelem->ibuf); + } return seqfirst->curelem->ibuf; |