mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-01 22:21:13 +00:00
playback/player: 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.
This commit is contained in:
parent
89c74b3dd8
commit
1d760d92ed
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue