diff options
author | Tim Terriberry <tterribe@xiph.org> | 2010-10-13 23:28:48 +0000 |
---|---|---|
committer | Tim Terriberry <tterribe@xiph.org> | 2010-10-13 23:28:48 +0000 |
commit | 529a92ea997b78f9556c39acd1fe507de7b7fa4d (patch) | |
tree | 85d8ad2349d4869e53481f4d67c40d26b48fd17e | |
parent | 6cd7817e54df6984cba618d1a4e2d9f48c07d917 (diff) | |
download | tremor-529a92ea997b78f9556c39acd1fe507de7b7fa4d.tar.gz |
Forward port the rest of r5278.
The vorbisfile part of this got merged in r16259, but the corresponding changes
to voris_synthesis_init() to actually return a failure code did not.
git-svn-id: https://svn.xiph.org/trunk/Tremor@17518 0101bb08-14d6-0310-b084-bc0e0c8e3800
-rw-r--r-- | block.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -148,6 +148,8 @@ static int _vds_init(vorbis_dsp_state *v,vorbis_info *vi){ codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; private_state *b=NULL; + if(ci==NULL) return 1; + memset(v,0,sizeof(*v)); b=(private_state *)(v->backend_state=_ogg_calloc(1,sizeof(*b))); @@ -188,7 +190,7 @@ static int _vds_init(vorbis_dsp_state *v,vorbis_info *vi){ b->mode[i]=_mapping_P[maptype]->look(v,ci->mode_param[i], ci->map_param[mapnum]); } - return(0); + return 0; } int vorbis_synthesis_restart(vorbis_dsp_state *v){ @@ -212,10 +214,10 @@ int vorbis_synthesis_restart(vorbis_dsp_state *v){ } int vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi){ - _vds_init(v,vi); + if(_vds_init(v,vi))return 1; vorbis_synthesis_restart(v); - return(0); + return 0; } void vorbis_dsp_clear(vorbis_dsp_state *v){ |