[xiph-commits] r14531 - trunk/vorbis-tools/ogginfo

ivo at svn.xiph.org ivo at svn.xiph.org
Thu Feb 21 06:47:29 PST 2008


Author: ivo
Date: 2008-02-21 06:47:28 -0800 (Thu, 21 Feb 2008)
New Revision: 14531

Modified:
   trunk/vorbis-tools/ogginfo/ogginfo2.c
Log:
Corrected values for magic check.  Made char *comment constant.

Modified: trunk/vorbis-tools/ogginfo/ogginfo2.c
===================================================================
--- trunk/vorbis-tools/ogginfo/ogginfo2.c	2008-02-19 10:37:19 UTC (rev 14530)
+++ trunk/vorbis-tools/ogginfo/ogginfo2.c	2008-02-21 14:47:28 UTC (rev 14531)
@@ -171,7 +171,7 @@
     va_end(ap);
 }
 
-static void check_xiph_comment(stream_processor *stream, int i, char *comment,
+static void check_xiph_comment(stream_processor *stream, int i, const char *comment,
     int comment_length)
 {
     char *sep = strchr(comment, '=');
@@ -802,15 +802,15 @@
             theora_start(stream);
         else if(packet.bytes >= 8 && memcmp(packet.packet, "OggMIDI\0", 8)==0)
             other_start(stream, "MIDI");
-        else if(packet.bytes >= 4 && memcmp(packet.packet, "\177FLAC", 5)==0)
+        else if(packet.bytes >= 5 && memcmp(packet.packet, "\177FLAC", 5)==0)
             other_start(stream, "FLAC");
         else if(packet.bytes >= 8 && memcmp(packet.packet, "Speex   ", 8)==0)
             other_start(stream, "speex");
         else if(packet.bytes >= 8 && memcmp(packet.packet, "fishead\0", 8)==0)
             other_start(stream, "skeleton");
-        else if(packet.bytes >= 4 && memcmp(packet.packet, "KW-DIRAC", 8)==0)
+        else if(packet.bytes >= 8 && memcmp(packet.packet, "KW-DIRAC", 8)==0)
             other_start(stream, "dirac");
-        else if(packet.bytes >= 7 && memcmp(packet.packet, "\x80kate\0\0\0\0", 8)==0)
+        else if(packet.bytes >= 9 && memcmp(packet.packet, "\x80kate\0\0\0\0", 9)==0)
             other_start(stream, "kate");
         else
             other_start(stream, NULL);



More information about the commits mailing list