Commit 49f92962 authored by conrad's avatar conrad

fit kate magic into the first 8 bytes. Patch by ogg.k.ogg.k


git-svn-id: http://svn.annodex.net/liboggz/trunk@3607 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent 2e783f3f
......@@ -1042,7 +1042,7 @@ const oggz_auto_contenttype_t oggz_auto_codec_ident[] = {
{"\177FLAC", 4, "Flac", auto_flac, auto_calc_flac, NULL},
{"AnxData", 7, "AnxData", auto_anxdata, NULL, NULL},
{"CELT ", 8, "CELT", auto_celt, auto_calc_celt, NULL},
{"\200kate\0\0\0\0", 9, "Kate", auto_kate, NULL, NULL},
{"\200kate\0\0\0", 8, "Kate", auto_kate, NULL, NULL},
{"", 0, "Unknown", NULL, NULL, NULL}
};
......@@ -1138,7 +1138,8 @@ oggz_auto_read_comments (OGGZ * oggz, oggz_stream_t * stream, long serialno,
offset = 7;
break;
case OGGZ_CONTENT_KATE:
if (op->bytes > 9 && memcmp (op->packet, "\201kate\0\0\0\0", 9) == 0) {
if (op->bytes > 9 && memcmp (op->packet, "\201kate\0\0\0", 8) == 0) {
/* we skip the reserved 0 byte after the signature */
offset = 9;
}
break;
......
......@@ -437,11 +437,11 @@ This was the Theora header for theora-alpha2:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1| Byte
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| packtype | Identifier char[8]: 'kate\0\0\0\0' | 0-3
| packtype | Identifier char[7]: 'kate\0\0\0' | 0-3
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| kate magic continued | 4-7
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| kate magic | version major | version minor | num headers | 8-11
| reserved - 0 | version major | version minor | num headers | 8-11
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| text encoding | directionality| reserved - 0 | granule shift | 12-15
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment