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

Steve Lhomme slhomme at matroska.org
Sat Sep 15 16:35:14 CEST 2012

Sorry for the delay to see this.

The EBML spec you are refering to is old. The 10-bytes float was
dropped a little after. As for the zero-size elements, libebml can
read integer ones (just by chance of how the code is done) but doesn't
read the float ones. It never write any of them. So just use the more
up to date specs.


On Mon, Aug 13, 2012 at 1:10 AM, Matthew Gregan <kinetik at flim.org> wrote:
> 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
> _______________________________________________
> Matroska-devel mailing list
> Matroska-devel at lists.matroska.org
> http://lists.matroska.org/cgi-bin/mailman/listinfo/matroska-devel
> Read Matroska-Devel on GMane: http://dir.gmane.org/gmane.comp.multimedia.matroska.devel

Steve Lhomme
Matroska association Chairman

More information about the Matroska-devel mailing list