mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
audioecho: Fix handling of delay property in PLAYING/PAUSED state
https://bugzilla.gnome.org/show_bug.cgi?id=703901
This commit is contained in:
parent
3aa20e7c8d
commit
4d517e94ef
1 changed files with 6 additions and 0 deletions
|
@ -187,6 +187,7 @@ gst_audio_echo_set_property (GObject * object, guint prop_id,
|
|||
switch (prop_id) {
|
||||
case PROP_DELAY:{
|
||||
guint64 max_delay, delay;
|
||||
guint rate;
|
||||
|
||||
g_mutex_lock (&self->lock);
|
||||
delay = g_value_get_uint64 (value);
|
||||
|
@ -201,6 +202,11 @@ gst_audio_echo_set_property (GObject * object, guint prop_id,
|
|||
self->delay = delay;
|
||||
self->max_delay = MAX (delay, max_delay);
|
||||
}
|
||||
rate = GST_AUDIO_FILTER_RATE (self);
|
||||
if (rate > 0)
|
||||
self->delay_frames =
|
||||
MAX (gst_util_uint64_scale (self->delay, rate, GST_SECOND), 1);
|
||||
|
||||
g_mutex_unlock (&self->lock);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue