diff options
author | Stefan Sauer <ensonic@users.sf.net> | 2013-10-21 13:06:46 +0200 |
---|---|---|
committer | Stefan Sauer <ensonic@users.sf.net> | 2013-10-21 13:06:46 +0200 |
commit | 6c4b51dd5c0421116fa47bb959f97cb04f34d3d1 (patch) | |
tree | 8b1de957002d9e7bd27287e6fea30c724bb0dede /mediainfo | |
parent | e1464c2a6e2e0217bd334f57b0d82ec6a04a78ce (diff) |
mi-info: handle streams with unknown duration
Diffstat (limited to 'mediainfo')
-rw-r--r-- | mediainfo/src/mi-info.vala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mediainfo/src/mi-info.vala b/mediainfo/src/mi-info.vala index 0a9207d..633c859 100644 --- a/mediainfo/src/mi-info.vala +++ b/mediainfo/src/mi-info.vala @@ -923,6 +923,9 @@ public class MediaInfo.Info : Box } private string format_time(ClockTime t) { + if (t == Gst.CLOCK_TIME_NONE) + return "unknown"; + return "%u:%02u:%02u.%09u".printf ( (uint) (t / (SECOND * 60 * 60)), (uint) ((t / (SECOND * 60)) % 60), |