gecko-dev/media/libvorbis/bug481601.patch

67 lines
2.3 KiB
Diff

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,16 +170,17 @@ extern void vorbis_comment_add(vorbis_comment *vc, char *comment);
extern void vorbis_comment_add_tag(vorbis_comment *vc,
char *tag, char *contents);
extern char *vorbis_comment_query(vorbis_comment *vc, char *tag, int count);
extern int vorbis_comment_query_count(vorbis_comment *vc, 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);
/* 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){