# HG changeset patch # User giacomo # Date 1145149557 25200 # Node ID d78fa5f0b68083d055743ecf0538f4593575d82c # Parent 2078cdac350281b1b0d65863eadfb1865f2feb19 [svn] prevent audiocompress from fulfilling its suicidal tendencies diff -r 2078cdac3502 -r d78fa5f0b680 Plugins/Effect/audiocompress/audacious-glue.c --- a/Plugins/Effect/audiocompress/audacious-glue.c Sat Apr 15 09:08:23 2006 -0700 +++ b/Plugins/Effect/audiocompress/audacious-glue.c Sat Apr 15 18:05:57 2006 -0700 @@ -35,6 +35,8 @@ static int myModify(gpointer * data, gint length, AFormat fmt, gint srate, gint nch); +static int inited = 0; + static EffectPlugin xmms_plugin = { NULL, NULL, @@ -54,7 +56,6 @@ void myInit(void) { - static int inited = 0; if (!inited) { initPrefs(&prefs); @@ -72,6 +73,7 @@ savePrefs(&prefs); freePrefs(&prefs); CompressFree(); + inited = 0; } int myModify(gpointer * data, gint length, AFormat fmt, gint srate, gint nch) diff -r 2078cdac3502 -r d78fa5f0b680 Plugins/Effect/audiocompress/compress.c --- a/Plugins/Effect/audiocompress/compress.c Sat Apr 15 09:08:23 2006 -0700 +++ b/Plugins/Effect/audiocompress/compress.c Sat Apr 15 18:05:57 2006 -0700 @@ -44,7 +44,10 @@ void CompressFree(void) { if (peaks) + { free(peaks); + peaks = NULL; + } } void CompressDo(void *data, unsigned int length)