diff options
author | Alex Converse <alex.converse@gmail.com> | 2010-04-02 16:26:10 +0000 |
---|---|---|
committer | Alex Converse <alex.converse@gmail.com> | 2010-04-02 16:26:10 +0000 |
commit | 523429220b8798dc3ae94c49201300bdeccb2dc9 (patch) | |
tree | 4a599350183815fac7fb1b0fb16498f8701d383b | |
parent | 7b374c9ff2a12243222e594df641906f2e2b0cd6 (diff) | |
download | ffmpeg-523429220b8798dc3ae94c49201300bdeccb2dc9.tar.gz |
aacenc: Error when an unsupported profile is requested
Originally committed as revision 22784 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/aacenc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index eb32d1464c..6b836ae79f 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); |