diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2004-07-16 11:05:53 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2004-07-16 11:05:53 +0000 |
commit | 9154ebe374b70a259655e635f3e1e5ecb822c250 (patch) | |
tree | 463a588e5f1f580c905af7e7ffda8017b39e2498 /examples/seeking | |
parent | 5144495895aa7712228355084d5c165a2c65005b (diff) | |
download | gst-plugins-bad-9154ebe374b70a259655e635f3e1e5ecb822c250.tar.gz gst-plugins-bad-9154ebe374b70a259655e635f3e1e5ecb822c250.tar.bz2 gst-plugins-bad-9154ebe374b70a259655e635f3e1e5ecb822c250.zip |
Make sure the widget gets updated even if the slider value doesn't change.
Original commit message from CVS:
Make sure the widget gets updated even if the slider value doesn't change.
Diffstat (limited to 'examples/seeking')
-rw-r--r-- | examples/seeking/seek.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/seeking/seek.c b/examples/seeking/seek.c index 2f70de9a..fce17f3e 100644 --- a/examples/seeking/seek.c +++ b/examples/seeking/seek.c @@ -11,6 +11,7 @@ static GList *seekable_elements = NULL; static GstElement *pipeline; static guint64 duration; static GtkAdjustment *adjustment; +static GtkWidget *hscale; static gboolean stats = FALSE; static gboolean elem_seek = FALSE; static gboolean verbose = FALSE; @@ -789,9 +790,12 @@ update_scale (gpointer data) } query_rates (); } + if (position >= duration) + duration = position; if (duration > 0) { gtk_adjustment_set_value (adjustment, position * 100.0 / duration); + gtk_widget_queue_draw (hscale); } return TRUE; @@ -945,8 +949,7 @@ print_usage (int argc, char **argv) int main (int argc, char **argv) { - GtkWidget *window, *hbox, *vbox, - *play_button, *pause_button, *stop_button, *hscale; + GtkWidget *window, *hbox, *vbox, *play_button, *pause_button, *stop_button; struct poptOption options[] = { {"stats", 's', POPT_ARG_NONE | POPT_ARGFLAG_STRIP, &stats, 0, "Show pad stats", NULL}, |