summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrashant Gotarne <ps.gotarne@samsung.com>2015-08-14 09:36:09 +0530
committerTim-Philipp Müller <tim@centricular.com>2015-08-14 11:50:22 +0100
commit0671ea85aff793df6cb7fd16ad26fad24501dc69 (patch)
tree0c8c6bf3f7aaae46322dbd4c061432e7a38cb63d
parentabc33c928fc39ab58ec7f8f3784b72b4266242ae (diff)
audioecho: make sure buffer gets reallocated if max_delay changes
https://bugzilla.gnome.org/show_bug.cgi?id=753490
-rw-r--r--gst/audiofx/audioecho.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gst/audiofx/audioecho.c b/gst/audiofx/audioecho.c
index 80238274e..769994bd7 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;