[xiph-commits] r3607 - liboggz/trunk/src/liboggz
conrad at svn.annodex.net
conrad at svn.annodex.net
Mon Jun 16 02:48:06 PDT 2008
Author: conrad
Date: 2008-06-16 02:48:05 -0700 (Mon, 16 Jun 2008)
New Revision: 3607
Modified:
liboggz/trunk/src/liboggz/oggz_auto.c
liboggz/trunk/src/liboggz/oggz_auto.h
Log:
fit kate magic into the first 8 bytes. Patch by ogg.k.ogg.k
Modified: liboggz/trunk/src/liboggz/oggz_auto.c
===================================================================
--- liboggz/trunk/src/liboggz/oggz_auto.c 2008-06-03 02:29:43 UTC (rev 3606)
+++ liboggz/trunk/src/liboggz/oggz_auto.c 2008-06-16 09:48:05 UTC (rev 3607)
@@ -1042,7 +1042,7 @@
{"\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 @@
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;
Modified: liboggz/trunk/src/liboggz/oggz_auto.h
===================================================================
--- liboggz/trunk/src/liboggz/oggz_auto.h 2008-06-03 02:29:43 UTC (rev 3606)
+++ liboggz/trunk/src/liboggz/oggz_auto.h 2008-06-16 09:48:05 UTC (rev 3607)
@@ -437,11 +437,11 @@
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
More information about the commits
mailing list