[vlc-devel] commit: audioscrobbler: reset pause start counter when changing state ( Rafaël Carré )
git version control
git at videolan.org
Sat Oct 17 15:25:35 CEST 2009
vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Sat Oct 17 15:24:46 2009 +0200| [a8ae83ca5c808e2064d4bca2a3108016a96703b2] | committer: Rafaël Carré
audioscrobbler: reset pause start counter when changing state
refs #3089
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a8ae83ca5c808e2064d4bca2a3108016a96703b2
---
modules/misc/audioscrobbler.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/modules/misc/audioscrobbler.c b/modules/misc/audioscrobbler.c
index c4a1d22..47a44f3 100644
--- a/modules/misc/audioscrobbler.c
+++ b/modules/misc/audioscrobbler.c
@@ -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;
}
More information about the vlc-devel
mailing list