[Matroska-devel] Ambiguous definition of EBML integer and float types

Matthew Gregan kinetik at flim.org
Mon Aug 13 01:10:33 CEST 2012


Hi all,

I raised this on the webm-discuss mailing list a couple of weeks ago[0],but
I thought it might be worth raising here so that the right people see it and
the documentation gets updated.

A bug[1] was recently filed against Firefox's WebM parser (libnestegg)
because it rejects a file with a zero length Timecode value.  The Timecode
element (immediately followed by a SimpleBlock) is encoded as
|0xe7 0x80 0xa3 ...|.

The WebM container spec (http://www.webmproject.org/code/specs/container/)
mostly defers to the Matroska spec
(http://matroska.org/technical/specs/index.html).  The Matroska spec states
that signed and unsigned integer types are 1 to 8 octets and float types are
4 or 8 octets.  This is repeated by the EBML spec
(http://ebml.sourceforge.net/specs/).

Timecode is defined as an element with an unsigned integer value that has no
default value.

However, the EBML RFC (http://matroska.org/technical/specs/rfc/index.html)
states that signed and unsigned integers values are 0 to 8 octets, and that
a zero byte integer represents 0.  For floats, it states that they may be 0,
4, 8, or 10 bytes, with a zero byte float representing 0.0.

Can someone (Steve?) please clarify the correct definition.  Most of the
spec documentation seems to support Firefox's current behaviour, but mkvinfo
(5.0.1) parses the file correctly, and mkvalidator (0.4.0) does not produce
a warning.

[0] https://groups.google.com/a/webmproject.org/forum/?fromgroups#!topic/webm-discuss/5DBY7-NOtAQ
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=778436

Thanks,
-mjg


More information about the Matroska-devel mailing list