Commit ad338835 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

macosx/framework: Duration is in millisecs, not in microsecs.

parent a6b1ff10
......@@ -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)]];
}
}
......
......@@ -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",
......@@ -121,7 +121,7 @@
{
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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment