[xiph-commits] r17177 - trunk/vorbis/lib

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Mon Apr 26 07:24:08 PDT 2010


Author: xiphmont
Date: 2010-04-26 07:24:08 -0700 (Mon, 26 Apr 2010)
New Revision: 17177

Modified:
   trunk/vorbis/lib/block.c
Log:
One of the Mozilla fixes for #1573 (working around liboggplay 
ignoring an error return value) broke chaining by causing 
vorbis_synthesis_init() to fail on a second call.  Fixed.



Modified: trunk/vorbis/lib/block.c
===================================================================
--- trunk/vorbis/lib/block.c	2010-04-26 08:05:07 UTC (rev 17176)
+++ trunk/vorbis/lib/block.c	2010-04-26 14:24:08 UTC (rev 17177)
@@ -232,16 +232,17 @@
     v->analysisp=1;
   }else{
     /* finish the codebooks */
-    if(!ci->fullbooks)
+    if(!ci->fullbooks){
       ci->fullbooks=_ogg_calloc(ci->books,sizeof(*ci->fullbooks));
-    for(i=0;i<ci->books;i++){
-      if(ci->book_param[i]==NULL)
-        goto abort_books;
-      if(vorbis_book_init_decode(ci->fullbooks+i,ci->book_param[i]))
-        goto abort_books;
+      for(i=0;i<ci->books;i++){
+        if(ci->book_param[i]==NULL)
+          goto abort_books;
+        if(vorbis_book_init_decode(ci->fullbooks+i,ci->book_param[i]))
+          goto abort_books;
         /* decode codebooks are now standalone after init */
-      vorbis_staticbook_destroy(ci->book_param[i]);
-      ci->book_param[i]=NULL;
+        vorbis_staticbook_destroy(ci->book_param[i]);
+        ci->book_param[i]=NULL;
+      }
     }
   }
 



More information about the commits mailing list