]> git.sesse.net Git - vlc/commitdiff
macosx/framework: Duration is in millisecs, not in microsecs.
authorPierre d'Herbemont <pdherbemont@free.fr>
Sat, 16 Jan 2010 15:12:55 +0000 (16:12 +0100)
committerPierre d'Herbemont <pdherbemont@free.fr>
Sat, 16 Jan 2010 17:26:08 +0000 (18:26 +0100)
projects/macosx/framework/Sources/VLCMediaPlayer.m
projects/macosx/framework/Sources/VLCTime.m

index 3dac7ee258ff78c07ea2af0febb62513ce2570c6..bad64b8d05afade2724b9383e0ecac288143de3d 100644 (file)
@@ -450,8 +450,8 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
     libvlc_exception_init( &ex );
     // Time is managed in seconds, while duration is managed in microseconds
     // TODO: Redo VLCTime to provide value numberAsMilliseconds, numberAsMicroseconds, numberAsSeconds, numberAsMinutes, numberAsHours
-    libvlc_media_player_set_time( (libvlc_media_player_t *)instance, 
-                                    (value ? [[value numberValue] longLongValue] / 1000 : 0),
+    libvlc_media_player_set_time( (libvlc_media_player_t *)instance,
+                                    (value ? [[value numberValue] longLongValue] : 0),
                                     &ex );
     catch_exception( &ex );
 }
@@ -733,7 +733,7 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
 {
     if( [self isSeekable] )
     {
-        interval = interval * 1000000;
+        interval = interval * 1000;
         [self setTime: [VLCTime timeWithInt: ([[self time] intValue] - interval)]];
     }
 }
@@ -742,7 +742,7 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
 {
     if( [self isSeekable] )
     {
-        interval = interval * 1000000;
+        interval = interval * 1000;
         [self setTime: [VLCTime timeWithInt: ([[self time] intValue] + interval)]];
     }
 }
index fa4dc4e3058c0a51a48fb5dde06e390c605457c7..47c4b62231471ef87a425c0c8899f325e5aeda3b 100644 (file)
@@ -96,7 +96,7 @@
 {
     if (value)
     {
-        long long duration = [value longLongValue] / 1000000;
+        long long duration = [value longLongValue] / 1000;
         long long positiveDuration = llabs(duration);
         if( positiveDuration > 3600 )
             return [NSString stringWithFormat:@"%s%01d:%02d:%02d",
 {
     if (value)
     {
-        long long duration = [value longLongValue] / 1000000;
+        long long duration = [value longLongValue] / 1000;
         long long positiveDuration = llabs(duration);
         long hours = positiveDuration / 3600;
         long mins = (positiveDuration / 60) % 60;