[xiph-cvs] cvs commit: vorbis-tools/ogginfo ogginfo2.c

Michael Smith msmith at xiph.org
Fri Jul 5 21:21:42 PDT 2002



msmith      02/07/05 21:21:42

  Modified:    ogginfo  ogginfo2.c
  Log:
  Deal better with corrupt streams.

Revision  Changes    Path
1.7       +2 -3      vorbis-tools/ogginfo/ogginfo2.c

Index: ogginfo2.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogginfo/ogginfo2.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ogginfo2.c	2002/07/03 14:42:48	1.6
+++ ogginfo2.c	2002/07/06 04:21:42	1.7
@@ -485,10 +485,9 @@
         res = ogg_stream_packetout(&stream->os, &packet);
         if(res <= 0) {
             warn(_("Warning: Invalid header page, no packet found\n"));
-            return NULL;
+            other_start(stream, NULL);
         }
-
-        if(packet.bytes >= 7 && memcmp(packet.packet, "\001vorbis", 7)==0)
+        else if(packet.bytes >= 7 && memcmp(packet.packet, "\001vorbis", 7)==0)
             vorbis_start(stream);
         else if(packet.bytes >= 8 && memcmp(packet.packet, "OggMIDI\0", 8)==0) 
             other_start(stream, "MIDI");

<p><p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list