# HG changeset patch # User William Pitcock # Date 1216283880 18000 # Node ID f9b49a8913b72b1b13d0ad540a811bc40ebb7e2c # Parent 5e70c200eb8d22f98eecfabce08a4174e250ffe2 minimal interface: improve sanity for playback_seek() to make seek times more accurate. diff -r 5e70c200eb8d -r f9b49a8913b7 src/audacious/ui_new.c --- a/src/audacious/ui_new.c Wed Jul 16 17:32:37 2008 -0500 +++ b/src/audacious/ui_new.c Thu Jul 17 03:38:00 2008 -0500 @@ -170,9 +170,13 @@ static gboolean ui_slider_value_changed_cb(GtkRange *range, gpointer user_data) { - /* we are not allowed to do a playback_seek() with values < 1, therefore - * we add 1 to be on the safe side --mf0102 */ - playback_seek(gtk_range_get_value(range)/1000 + 1); + gint seek_; + + seek_ = gtk_range_get_value(range) / 1000; + + /* XXX: work around a horrible bug in playback_seek(), also + we should do mseek here. --nenolod */ + playback_seek(seek_ != 0 ? seek_ : 1); return TRUE; }