mirror of
https://code.videolan.org/videolan/vlc
synced 2024-10-07 03:56:28 +02:00
VLCKit: don't return timestamps with hour digits, if time is shorter than 1 hour
This commit is contained in:
parent
1ce5fef45b
commit
bade53fbca
@ -75,15 +75,20 @@
|
||||
if (value)
|
||||
{
|
||||
long long duration = [value longLongValue] / 1000000;
|
||||
if( duration > 3600 )
|
||||
return [NSString stringWithFormat:@"%01d:%02d:%02d",
|
||||
(long) (duration / 3600),
|
||||
(long)((duration / 60) % 60),
|
||||
(long) (duration % 60)];
|
||||
else
|
||||
return [NSString stringWithFormat:@"%02d:%02d",
|
||||
(long)((duration / 60) % 60),
|
||||
(long) (duration % 60)];
|
||||
}
|
||||
else
|
||||
{
|
||||
// Return a string that represents an undefined time.
|
||||
return @"-:--:--";
|
||||
return @"--:--";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user