[xiph-commits] r3509 - liboggz/trunk/src/tools

conrad at svn.annodex.net conrad at svn.annodex.net
Fri Mar 7 02:46:42 PST 2008


Author: conrad
Date: 2008-03-07 02:46:42 -0800 (Fri, 07 Mar 2008)
New Revision: 3509

Modified:
   liboggz/trunk/src/tools/oggzinfo.c
Log:
fix crash in oggzinfo if a skeleton track refers to a track not
found in the physical stream (while a skeleton track like this is
moderately useful, it can happen if you demux tracks and oggzinfo each
of them). Patch by ogg.k.ogg.k


Modified: liboggz/trunk/src/tools/oggzinfo.c
===================================================================
--- liboggz/trunk/src/tools/oggzinfo.c	2008-03-07 10:45:51 UTC (rev 3508)
+++ liboggz/trunk/src/tools/oggzinfo.c	2008-03-07 10:46:42 UTC (rev 3509)
@@ -397,8 +397,13 @@
     int ret = fisbone_from_ogg(op, &fp);
     if (ret<0) return ret;
     oit = oggz_table_lookup (info->tracks, fp.serial_no);
-    oit->has_fisbone = 1;
-    oit->fbInfo = fp;
+    if (oit) {
+      oit->has_fisbone = 1;
+      oit->fbInfo = fp;
+    }
+    else {
+      fprintf(stderr, "Warning: logical stream %08x referenced by skeleton was not found\n",fp.serial_no);
+    }
   } else if (!op->e_o_s && !memcmp(op->packet, FISHEAD_IDENTIFIER, 8)) {
     fishead_packet fp;
     int ret = fishead_from_ogg(op, &fp);



More information about the commits mailing list