* gnome.c : Gnome plugin for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
- * $Id: gnome.c,v 1.12 2003/03/07 00:53:09 gbazin Exp $
+ * $Id: gnome.c,v 1.13 2003/03/10 18:17:19 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* finished dragging the slider.
* Beware, the hack below is needed by the dvdplay plugin! */
else if( p_intf->p_sys->b_slider_free
- /* hack -> */ && (p_intf->p_sys->f_adj_oldvalue <= 100.) )
+ /* hack -> */ && (p_intf->p_sys->f_adj_oldvalue < 100.) )
{
- if( newvalue > 0. && newvalue < 100. )
+ if( newvalue >= 0. && newvalue < 100. )
{
off_t i_seek = ( newvalue * p_area->i_size ) / 100;
* gtk.c : Gtk+ plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: gtk.c,v 1.17 2003/03/07 00:53:09 gbazin Exp $
+ * $Id: gtk.c,v 1.18 2003/03/10 18:17:19 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* finished dragging the slider.
* Beware, the hack below is needed by the dvdplay plugin! */
else if( p_intf->p_sys->b_slider_free
- /* hack -> */ && (p_intf->p_sys->f_adj_oldvalue <= 100.) )
+ /* hack -> */ && (p_intf->p_sys->f_adj_oldvalue < 100.) )
{
- off_t i_seek = ( newvalue * p_area->i_size ) / 100;
-
- /* release the lock to be able to seek */
- vlc_mutex_unlock( &p_input->stream.stream_lock );
- input_Seek( p_input, i_seek, INPUT_SEEK_SET );
- vlc_mutex_lock( &p_input->stream.stream_lock );
+ if( newvalue >= 0. && newvalue < 100. )
+ {
+ off_t i_seek = ( newvalue * p_area->i_size ) / 100;
+
+ /* release the lock to be able to seek */
+ vlc_mutex_unlock( &p_input->stream.stream_lock );
+ input_Seek( p_input, i_seek, INPUT_SEEK_SET );
+ vlc_mutex_lock( &p_input->stream.stream_lock );
+ }
/* Update the old value */
p_intf->p_sys->f_adj_oldvalue = newvalue;