Bug 518952 - Remove unnecessary local patch against libvorbis. r=chris.double
authorMatthew Gregan <kinetik@flim.org>
Mon, 05 Oct 2009 11:56:08 +1300
changeset 33448 f39c6fb004c9ddaf6f7cde08e422a65c750d1bfd
parent 33447 196956e36ed2be094042279103481673a8d6f6f3
child 33449 9cdacc9f7c81abaa28e02552c50757a0b4076504
push idunknown
push userunknown
push dateunknown
reviewerschris.double
bugs518952
milestone1.9.3a1pre
Bug 518952 - Remove unnecessary local patch against libvorbis. r=chris.double
media/libvorbis/README_MOZILLA
media/libvorbis/bug481601.patch
media/libvorbis/include/vorbis/codec.h
media/libvorbis/lib/vorbis_block.c
media/libvorbis/update.sh
--- a/media/libvorbis/README_MOZILLA
+++ b/media/libvorbis/README_MOZILLA
@@ -4,11 +4,10 @@ made were those applied by update.sh and
 Makefile.in files for the Mozilla build system.
 
 The svn revision number used was r16597.
 
 Some files are renamed during the copy to prevent clashes with object
 file names with other Mozilla libraries.
 
 alloca.diff - Bug 469639 - Failed to build firefox trunk on OpenSolaris
-bug481601.patch is appled to fix bug 481601.
 bug487519.patch: fix for bug 487519.
 bug498855.patch: fix for bug 498855
deleted file mode 100644
--- a/media/libvorbis/bug481601.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-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){
--- a/media/libvorbis/include/vorbis/codec.h
+++ b/media/libvorbis/include/vorbis/codec.h
@@ -170,17 +170,16 @@ extern void     vorbis_comment_add(vorbi
 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 ****************************/
 
--- a/media/libvorbis/lib/vorbis_block.c
+++ b/media/libvorbis/lib/vorbis_block.c
@@ -84,16 +84,18 @@ 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;
@@ -304,20 +306,16 @@ int vorbis_analysis_init(vorbis_dsp_stat
 
   /* 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){
--- a/media/libvorbis/update.sh
+++ b/media/libvorbis/update.sh
@@ -42,11 +42,10 @@ cp $1/lib/codebook.c ./lib/vorbis_codebo
 cp $1/lib/bitrate.c ./lib/vorbis_bitrate.c
 cp $1/lib/block.c ./lib/vorbis_block.c
 cp $1/include/vorbis/codec.h ./include/vorbis/codec.h
 cp $1/todo.txt ./todo.txt
 cp $1/COPYING ./COPYING
 cp $1/README ./README
 cp $1/AUTHORS ./AUTHORS
 patch -p3 < ./alloca.diff
-patch -p3 <./bug481601.patch
 patch -p3 <bug487519.patch
 patch -p3 <bug498855.patch