[PATCH] fit kate magic into 8 bytes

View: New views
1 Messages — Rating Filter:   Alert me  

[PATCH] fit kate magic into 8 bytes

by ogg.k.ogg.k@googlemail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

this patch only checks magic in the first 8 bytes, to match a
proposed common Ogg codec requirement.
The actual bitstream format is left unchanged, just the interpretation
changes slightly.

Thanks

[magic-icecast.diff]

diff -ru /mnt/dvd/svn/xiph/icecast/src/format_kate.c icecast/src/format_kate.c
--- /mnt/dvd/svn/xiph/icecast/src/format_kate.c 2008-06-06 11:04:03.000000000 +0100
+++ icecast/src/format_kate.c 2008-06-14 00:38:12.000000000 +0100
@@ -209,7 +209,7 @@
     }
 #else
     /* we don't have libkate, so we examine the packet magic by hand */
-    if ((packet.bytes<9) || memcmp(packet.packet, "\x80kate\0\0\0\0", 9))
+    if ((packet.bytes<8) || memcmp(packet.packet, "\x80kate\0\0\0", 8))
     {
         ogg_stream_clear (&codec->os);
         free (kate_codec);


_______________________________________________
Icecast-dev mailing list
Icecast-dev@...
http://lists.xiph.org/mailman/listinfo/icecast-dev
LightInTheBox - Buy quality products at wholesale price