Mercurial > libavcodec.hg
changeset 11580:baf1f1555e92 libavcodec
aacenc: Error when an unsupported profile is requested
author | alexc |
---|---|
date | Fri, 02 Apr 2010 16:26:10 +0000 |
parents | 9db3fbaba639 |
children | 998691d7f8f5 |
files | aacenc.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/aacenc.c Fri Apr 02 14:19:39 2010 +0000 +++ b/aacenc.c Fri Apr 02 16:26:10 2010 +0000 @@ -170,6 +170,10 @@ 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);