[Matroska-devel] Duration (EBML: 44 89) in Seg inf part
Moritz Bunkus
moritz at bunkus.org
Wed Mar 6 12:55:59 CET 2013
Hey,
SegmentDuration is an EBML float, not an integer. See
http://www.matroska.org/technical/specs/index.html and see
http://www.matroska.org/technical/specs/rfc/index.html
So: read it as a four-byte IEEE floating point number (C data type:
"float"), cast into an eight-byte IEEE floating point number (C data
type: "double") in order to avoid overflows, then multiply by
TimecodeScale, and you should get the duration in nanoseconds.
Kind regards,
mosu
More information about the Matroska-devel
mailing list