audioscrobbler: reset pause start counter when changing state
authorRafaël Carré <rafael.carre@gmail.com>
Sat, 17 Oct 2009 13:24:46 +0000 (15:24 +0200)
committerRafaël Carré <rafael.carre@gmail.com>
Sat, 17 Oct 2009 13:24:46 +0000 (15:24 +0200)
refs #3089

modules/misc/audioscrobbler.c

index c4a1d22..47a44f3 100644 (file)
@@ -493,7 +493,10 @@ static int PlayingChange( vlc_object_t *p_this, const char *psz_var,
     else if( state_value.i_int == PAUSE_S )
         p_sys->time_pause = mdate();
     else if( p_sys->time_pause > 0 && state_value.i_int == PLAYING_S )
+    {
         p_sys->time_total_pauses += ( mdate() - p_sys->time_pause );
+        p_sys->time_pause = 0;
+    }
 
     return VLC_SUCCESS;
 }