[FFmpeg-soc] [soc]: r3166 - aacenc/aacenc.c

kostya subversion at mplayerhq.hu
Mon Aug 11 11:10:14 CEST 2008


Author: kostya
Date: Mon Aug 11 11:10:14 2008
New Revision: 3166

Log:
Add check on psy model initialization

Modified:
   aacenc/aacenc.c

Modified: aacenc/aacenc.c
==============================================================================
--- aacenc/aacenc.c	(original)
+++ aacenc/aacenc.c	Mon Aug 11 11:10:14 2008
@@ -226,7 +226,10 @@ static av_cold int aac_encode_init(AVCod
     s->samples = av_malloc(2 * 1024 * avctx->channels * sizeof(s->samples[0]));
     s->cpe = av_mallocz(sizeof(ChannelElement) * aac_chan_configs[avctx->channels-1][0]);
     //TODO: psy model selection with some option
-    ff_aac_psy_init(&s->psy, avctx, AAC_PSY_3GPP, aac_chan_configs[avctx->channels-1][0], 0, s->swb_sizes1024, s->swb_num1024, s->swb_sizes128, s->swb_num128);
+    if(ff_aac_psy_init(&s->psy, avctx, AAC_PSY_3GPP, aac_chan_configs[avctx->channels-1][0], 0, s->swb_sizes1024, s->swb_num1024, s->swb_sizes128, s->swb_num128) < 0){
+        av_log(avctx, AV_LOG_ERROR, "Cannot initialize selected model.\n");
+        return -1;
+    }
     avctx->extradata = av_malloc(2);
     avctx->extradata_size = 2;
     put_audio_specific_config(avctx);



More information about the FFmpeg-soc mailing list