From 23321dca5e1dc7adc5add85fa1e6451d17307cd1 Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Mon, 6 Dec 2010 17:35:36 +0000 Subject: libtremor: merge upstream revision 17518 actually returning failure code from vorbis_synthesis_init git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28750 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libtremor/block.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'apps/codecs/libtremor') diff --git a/apps/codecs/libtremor/block.c b/apps/codecs/libtremor/block.c index abf216611a..a86668a521 100644 --- a/apps/codecs/libtremor/block.c +++ b/apps/codecs/libtremor/block.c @@ -158,6 +158,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)); v->reset_pcmb=true; b=(private_state *)(v->backend_state=_ogg_calloc(1,sizeof(*b))); @@ -277,10 +279,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){ @@ -515,7 +517,7 @@ int vorbis_synthesis_pcmout(vorbis_dsp_state *v,ogg_int32_t ***pcm){ } return(v->pcm_current-v->pcm_returned); } - return(0); + return 0; } int vorbis_synthesis_read(vorbis_dsp_state *v,int bytes){ -- cgit v1.2.3