From: Alex Converse Date: Fri, 2 Apr 2010 16:26:10 +0000 (+0000) Subject: aacenc: Error when an unsupported profile is requested X-Git-Tag: v0.6~341 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=523429220b8798dc3ae94c49201300bdeccb2dc9;p=platform%2Fupstream%2Flibav.git aacenc: Error when an unsupported profile is requested Originally committed as revision 22784 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index eb32d14..6b836ae 100644 --- a/libavcodec/aacenc.c +++ b/libavcodec/aacenc.c @@ -170,6 +170,10 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_ERROR, "Unsupported number of channels: %d\n", avctx->channels); return -1; } + if (avctx->profile != FF_PROFILE_UNKNOWN && avctx->profile != FF_PROFILE_AAC_LOW) { + av_log(avctx, AV_LOG_ERROR, "Unsupported profile %d\n", avctx->profile); + return -1; + } s->samplerate_index = i; dsputil_init(&s->dsp, avctx);