[xiph-commits] r17531 - trunk/Tremor
tterribe at svn.xiph.org
tterribe at svn.xiph.org
Wed Oct 13 18:40:12 PDT 2010
Author: tterribe
Date: 2010-10-13 18:40:12 -0700 (Wed, 13 Oct 2010)
New Revision: 17531
Modified:
trunk/Tremor/block.c
Log:
Port r17177 from libvorbis.
r16328 (committed in Tremor as r17526) broke chaining by causing
vorbis_synthesis_init() to fail on a second call.
Modified: trunk/Tremor/block.c
===================================================================
--- trunk/Tremor/block.c 2010-10-14 01:33:46 UTC (rev 17530)
+++ trunk/Tremor/block.c 2010-10-14 01:40:12 UTC (rev 17531)
@@ -161,16 +161,17 @@
b->window[1]=_vorbis_window(0,ci->blocksizes[1]/2);
/* finish the codebooks */
- if(!ci->fullbooks)
+ if(!ci->fullbooks){
ci->fullbooks=(codebook *)_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;
- /* decode codebooks are now standalone after init */
- vorbis_staticbook_destroy(ci->book_param[i]);
- ci->book_param[i]=NULL;
+ 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;
+ }
}
v->pcm_storage=ci->blocksizes[1];
More information about the commits
mailing list