mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
audioecho: make sure buffer gets reallocated if max_delay changes
https://bugzilla.gnome.org/show_bug.cgi?id=753490
This commit is contained in:
parent
abc33c928f
commit
0671ea85af
1 changed files with 6 additions and 0 deletions
|
@ -200,6 +200,10 @@ gst_audio_echo_set_property (GObject * object, guint prop_id,
|
||||||
} else {
|
} else {
|
||||||
self->delay = delay;
|
self->delay = delay;
|
||||||
self->max_delay = MAX (delay, max_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);
|
rate = GST_AUDIO_FILTER_RATE (self);
|
||||||
if (rate > 0)
|
if (rate > 0)
|
||||||
|
@ -220,6 +224,8 @@ gst_audio_echo_set_property (GObject * object, guint prop_id,
|
||||||
" PLAYING or PAUSED state");
|
" PLAYING or PAUSED state");
|
||||||
} else {
|
} else {
|
||||||
self->max_delay = max_delay;
|
self->max_delay = max_delay;
|
||||||
|
g_free (self->buffer);
|
||||||
|
self->buffer = NULL;
|
||||||
}
|
}
|
||||||
g_mutex_unlock (&self->lock);
|
g_mutex_unlock (&self->lock);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue