]> git.sesse.net Git - vlc/commitdiff
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 c4a1d22ebff87d1e298df35fb8c9bd3a867d5c6b..47a44f3823241287ea0166af87ef6a2f6f1036af 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;
 }