Bug 498853 - libvorbis update - r=xiphmont
authorChris Double <chris.double@double.co.nz>
Fri, 19 Jun 2009 15:35:50 +1200
changeset 29347 592ca03298273cca07dc9d0cc52dbdaffaee2f86
parent 29346 1271d9a47bfb3286d9293e23022b95c0a15b3c87
child 29348 6106c4a9f080747f2e4e7edfc3a111ae2d8f13ed
push idunknown
push userunknown
push dateunknown
reviewersxiphmont
bugs498853
milestone1.9.2a1pre
Bug 498853 - libvorbis update - r=xiphmont
media/libvorbis/README_MOZILLA
media/libvorbis/bug498853.patch
media/libvorbis/lib/vorbis_info.c
media/libvorbis/update.sh
--- a/media/libvorbis/README_MOZILLA
+++ b/media/libvorbis/README_MOZILLA
@@ -8,9 +8,10 @@ file names with other Mozilla libraries.
 
 BUG 455372 - WinCE LibVorbis No FPU Support on WinMobile, removed FPU
 support for builds with WINCE defined.
 
 BUG 469639 - Failed to build firefox trunk on OpenSolaris
 bug481601.patch is appled to fix bug 481601.
 bug487519.patch: fix for bug 487519.
 bug498827.patch: fix for bug 498827
-bug498855.patch: fix for bug 498855
\ No newline at end of file
+bug498855.patch: fix for bug 498855
+bug498853.patch: fix for bug 498853
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/media/libvorbis/bug498853.patch
@@ -0,0 +1,31 @@
+diff --git a/media/libvorbis/lib/vorbis_info.c b/media/libvorbis/lib/vorbis_info.c
+index 1d50526..1356cb4 100644
+--- a/media/libvorbis/lib/vorbis_info.c
++++ b/media/libvorbis/lib/vorbis_info.c
+@@ -126,20 +126,22 @@ int vorbis_comment_query_count(vorbis_comment *vc, char *tag){
+   }
+ 
+   return count;
+ }
+ 
+ void vorbis_comment_clear(vorbis_comment *vc){
+   if(vc){
+     long i;
+-    for(i=0;i<vc->comments;i++)
+-      if(vc->user_comments[i])_ogg_free(vc->user_comments[i]);
+-    if(vc->user_comments)_ogg_free(vc->user_comments);
+-	if(vc->comment_lengths)_ogg_free(vc->comment_lengths);
++    if (vc->user_comments) {
++      for(i=0;i<vc->comments;i++)
++	if(vc->user_comments[i])_ogg_free(vc->user_comments[i]);
++      _ogg_free(vc->user_comments);
++    }
++    if(vc->comment_lengths)_ogg_free(vc->comment_lengths);
+     if(vc->vendor)_ogg_free(vc->vendor);
+     memset(vc,0,sizeof(*vc));
+   }
+ }
+ 
+ /* blocksize 0 is guaranteed to be short, 1 is guaranteed to be long.
+    They may be equal, but short will never ge greater than long */
+ int vorbis_info_blocksize(vorbis_info *vi,int zo){
--- a/media/libvorbis/lib/vorbis_info.c
+++ b/media/libvorbis/lib/vorbis_info.c
@@ -126,20 +126,22 @@ int vorbis_comment_query_count(vorbis_co
   }
 
   return count;
 }
 
 void vorbis_comment_clear(vorbis_comment *vc){
   if(vc){
     long i;
-    for(i=0;i<vc->comments;i++)
-      if(vc->user_comments[i])_ogg_free(vc->user_comments[i]);
-    if(vc->user_comments)_ogg_free(vc->user_comments);
-	if(vc->comment_lengths)_ogg_free(vc->comment_lengths);
+    if (vc->user_comments) {
+      for(i=0;i<vc->comments;i++)
+	if(vc->user_comments[i])_ogg_free(vc->user_comments[i]);
+      _ogg_free(vc->user_comments);
+    }
+    if(vc->comment_lengths)_ogg_free(vc->comment_lengths);
     if(vc->vendor)_ogg_free(vc->vendor);
     memset(vc,0,sizeof(*vc));
   }
 }
 
 /* blocksize 0 is guaranteed to be short, 1 is guaranteed to be long.
    They may be equal, but short will never ge greater than long */
 int vorbis_info_blocksize(vorbis_info *vi,int zo){
--- a/media/libvorbis/update.sh
+++ b/media/libvorbis/update.sh
@@ -46,8 +46,9 @@ 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 <bug498827.patch
 patch -p3 <bug498855.patch
+patch -p3 <bug498853.patch