summaryrefslogtreecommitdiff
path: root/libavcodec/aacenc.c
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2010-04-02 16:26:10 +0000
committerAlex Converse <alex.converse@gmail.com>2010-04-02 16:26:10 +0000
commit523429220b8798dc3ae94c49201300bdeccb2dc9 (patch)
tree4a599350183815fac7fb1b0fb16498f8701d383b /libavcodec/aacenc.c
parent7b374c9ff2a12243222e594df641906f2e2b0cd6 (diff)
aacenc: Error when an unsupported profile is requested
Originally committed as revision 22784 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aacenc.c')
-rw-r--r--libavcodec/aacenc.c4
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);