Bug 498853 - libvorbis update - r=xiphmont

This commit is contained in:
Chris Double 2009-06-19 15:35:50 +12:00
Родитель d28f9a06ab
Коммит ca05db5edc
4 изменённых файлов: 40 добавлений и 5 удалений

Просмотреть файл

@ -13,4 +13,5 @@ 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
bug498855.patch: fix for bug 498855
bug498853.patch: fix for bug 498853

Просмотреть файл

@ -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){

Просмотреть файл

@ -131,10 +131,12 @@ int vorbis_comment_query_count(vorbis_comment *vc, char *tag){
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));
}

Просмотреть файл

@ -51,3 +51,4 @@ patch -p3 <./bug481601.patch
patch -p3 <bug487519.patch
patch -p3 <bug498827.patch
patch -p3 <bug498855.patch
patch -p3 <bug498853.patch