diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2016-08-22 16:19:59 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-08-22 16:19:59 +0300 |
commit | b97242f2d5da53e6f24f8d96c286990661f7dc61 (patch) | |
tree | e6262b1f36dbbd1c8df134899988401d67ab5c16 | |
parent | 081942d363ef75b62515e59f24a986ea0d53a6fa (diff) |
gtk: Block value-change signal handler while updating the range of the seekbar too
I.e. when updating the duration. Changing the range might also change the
value, which would then trigger a seek.
-rw-r--r-- | gtk/gtk-play.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c index 8aa6975..6dac913 100644 --- a/gtk/gtk-play.c +++ b/gtk/gtk-play.c @@ -1504,8 +1504,12 @@ create_ui (GtkPlay * play) static void duration_changed_cb (GstPlayer * unused, GstClockTime duration, GtkPlay * play) { + g_signal_handlers_block_by_func (play->seekbar, + seekbar_value_changed_cb, play); gtk_range_set_range (GTK_RANGE (play->seekbar), 0.0, (gdouble) duration / GST_SECOND); + g_signal_handlers_unblock_by_func (play->seekbar, + seekbar_value_changed_cb, play); } static void |