[vlc-devel] commit: Fix secstotimestr ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Feb 20 14:10:34 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Feb 20 15:10:08 2010 +0200| [f94cd3e8a2d4b80bbfdb68533f97d2998cdfe251] | committer: Rémi Denis-Courmont 

Fix secstotimestr

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f94cd3e8a2d4b80bbfdb68533f97d2998cdfe251
---

 src/misc/mtime.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/misc/mtime.c b/src/misc/mtime.c
index 8905be4..4d8a9da 100644
--- a/src/misc/mtime.c
+++ b/src/misc/mtime.c
@@ -134,11 +134,11 @@ char *secstotimestr( char *psz_buffer, int i_seconds )
     d = div( d.quot, 60 );
 
     if( d.quot )
-        snprintf( psz_buffer, MSTRTIME_MAX_SIZE, "%d:%2.2d:%2.2d",
+        snprintf( psz_buffer, MSTRTIME_MAX_SIZE, "%u:%02u:%02u",
                  d.quot, d.rem, i_seconds );
     else
-         snprintf( psz_buffer, MSTRTIME_MAX_SIZE, "%2.2d:%2.2d",
-                   d.quot, i_seconds );
+         snprintf( psz_buffer, MSTRTIME_MAX_SIZE, "%02u:%02u",
+                   d.rem, i_seconds );
     return psz_buffer;
 }
 




More information about the vlc-devel mailing list