From 0671ea85aff793df6cb7fd16ad26fad24501dc69 Mon Sep 17 00:00:00 2001 From: Prashant Gotarne Date: Fri, 14 Aug 2015 09:36:09 +0530 Subject: [PATCH] audioecho: make sure buffer gets reallocated if max_delay changes https://bugzilla.gnome.org/show_bug.cgi?id=753490 --- gst/audiofx/audioecho.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gst/audiofx/audioecho.c b/gst/audiofx/audioecho.c index 8023827..769994b 100644 --- a/gst/audiofx/audioecho.c +++ b/gst/audiofx/audioecho.c @@ -200,6 +200,10 @@ gst_audio_echo_set_property (GObject * object, guint prop_id, } else { self->delay = delay; self->max_delay = MAX (delay, max_delay); + if (delay > max_delay) { + g_free (self->buffer); + self->buffer = NULL; + } } rate = GST_AUDIO_FILTER_RATE (self); if (rate > 0) @@ -220,6 +224,8 @@ gst_audio_echo_set_property (GObject * object, guint prop_id, " PLAYING or PAUSED state"); } else { self->max_delay = max_delay; + g_free (self->buffer); + self->buffer = NULL; } g_mutex_unlock (&self->lock); break; -- 2.7.4