summaryrefslogtreecommitdiff
path: root/mediainfo
diff options
context:
space:
mode:
authorStefan Sauer <ensonic@users.sf.net>2013-10-21 13:06:46 +0200
committerStefan Sauer <ensonic@users.sf.net>2013-10-21 13:06:46 +0200
commit6c4b51dd5c0421116fa47bb959f97cb04f34d3d1 (patch)
tree8b1de957002d9e7bd27287e6fea30c724bb0dede /mediainfo
parente1464c2a6e2e0217bd334f57b0d82ec6a04a78ce (diff)
mi-info: handle streams with unknown duration
Diffstat (limited to 'mediainfo')
-rw-r--r--mediainfo/src/mi-info.vala3
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),