media/libvorbis/bug481601.patch
author Serge Gautherie <sgautherie.bz@free.fr>
Wed, 26 Aug 2009 18:36:40 +0200
changeset 31995 f6bf83b50648c8039699e08e62519489f8eb84fd
parent 31034 c6692a8f3f2725faadef43edd3142e533b452e62
permissions -rw-r--r--
Bug 469523 - xpcshell-tests: enable leak log in tinderbox (log); (Fv1) Move code to automationutils.py from automation.py.in r=ted.mielczarek

diff --git a/media/libvorbis/include/vorbis/codec.h b/media/libvorbis/include/vorbis/codec.h
index b23fe0a..c62b2d5 100644
--- a/media/libvorbis/include/vorbis/codec.h
+++ b/media/libvorbis/include/vorbis/codec.h
@@ -170,18 +170,19 @@ extern void     vorbis_comment_add(vorbis_comment *vc, char *comment);
 extern void     vorbis_comment_add_tag(vorbis_comment *vc,
                                        const char *tag, const char *contents);
 extern char    *vorbis_comment_query(vorbis_comment *vc, const char *tag, int count);
 extern int      vorbis_comment_query_count(vorbis_comment *vc, const char *tag);
 extern void     vorbis_comment_clear(vorbis_comment *vc);
 
 extern int      vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb);
 extern int      vorbis_block_clear(vorbis_block *vb);
+extern void     vorbis_dsp_init(vorbis_dsp_state *v);
 extern void     vorbis_dsp_clear(vorbis_dsp_state *v);
 extern double   vorbis_granule_time(vorbis_dsp_state *v,
                                     ogg_int64_t granulepos);
 
 extern const char *vorbis_version_string(void);
 
 /* Vorbis PRIMITIVES: analysis/DSP layer ****************************/
 
 extern int      vorbis_analysis_init(vorbis_dsp_state *v,vorbis_info *vi);
 extern int      vorbis_commentheader_out(vorbis_comment *vc, ogg_packet *op);
diff --git a/media/libvorbis/lib/vorbis_block.c b/media/libvorbis/lib/vorbis_block.c
index 3b6f456..d7f5974 100644
--- a/media/libvorbis/lib/vorbis_block.c
+++ b/media/libvorbis/lib/vorbis_block.c
@@ -84,18 +84,16 @@ static int ilog2(unsigned int v){
 #ifndef WORD_ALIGN
 #define WORD_ALIGN 8
 #endif
 
 int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb){
   int i;
   memset(vb,0,sizeof(*vb));
   vb->vd=v;
-  vb->localalloc=0;
-  vb->localstore=NULL;
   if(v->analysisp){
     vorbis_block_internal *vbi=
       vb->internal=_ogg_calloc(1,sizeof(vorbis_block_internal));
     vbi->ampmax=-9999;
 
     for(i=0;i<PACKETBLOBS;i++){
       if(i==PACKETBLOBS/2){
 	vbi->packetblob[i]=&vb->opb;
@@ -295,16 +293,20 @@ int vorbis_analysis_init(vorbis_dsp_state *v,vorbis_info *vi){
 
   /* compressed audio packets start after the headers
      with sequence number 3 */
   v->sequence=3;
 
   return(0);
 }
 
+void vorbis_dsp_init(vorbis_dsp_state *v){
+  memset(v,0,sizeof(*v));
+}
+
 void vorbis_dsp_clear(vorbis_dsp_state *v){
   int i;
   if(v){
     vorbis_info *vi=v->vi;
     codec_setup_info *ci=(vi?vi->codec_setup:NULL);
     private_state *b=v->backend_state;
 
     if(b){