mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 14:45:29 +00:00
32 lines
1.1 KiB
Diff
32 lines
1.1 KiB
Diff
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){
|