]> git.sesse.net Git - vlc/blobdiff - projects/macosx/framework/Sources/VLCMediaPlayer.m
macosx/framework: Duration is in millisecs, not in microsecs.
[vlc] / projects / macosx / framework / Sources / VLCMediaPlayer.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)]];
     }
 }