Re: [Matroska-devel] Why after 1A 45 DF A3 EBML header code I have 93...
Moritz Bunkus <[email protected]> Wed, 6 Mar 2013 12:59:57 +0100
| Newsgroups | gmane.comp.multimedia.matroska.general,gmane.comp.multimedia.matroska.devel |
|---|---|
| Message-ID | <CANPayMTm-2fUHFktBU=HFzhSA=o1RvGbDKDyk-Jv_QNmqfdXrQ@mail.gmail.com> |
Hey, On Wed, Mar 6, 2013 at 10:21 AM, Peter Ivanov <[email protected]> wrote: > What this code 93 means. After 42 82 DocType code there is 88 befor the > identificator "matroska". Every EBML element consists of three parts: 1. its ID 2. its content length 3. its content You've already identified the EBML ID correctly (0x42 82). Therefore the next byte(s) contain the content length encoded as an unsigned EBML integer. Therefore the first byte, 0x88, indicates that the length is encoded in a single byte and that the content length itself is 8. Therefore you read the following 8 bytes as the content, and that's exactly the string "matroska". See section 2.1 "Variable size integer" in http://www.matroska.org/technical/specs/rfc/index.html for information how to read variable-size EBML integer values. As a matter of fact, I suggest you read the whole section 2 of that document. Kind regards, mosu _______________________________________________ Matroska-general mailing list [email protected] http://lists.matroska.org/cgi-bin/mailman/listinfo/matroska-general Read Matroska-General on GMane: http://dir.gmane.org/gmane.comp.multimedia.matroska.general