]> git.sesse.net Git - ffmpeg/commitdiff
aacenc: Error when an unsupported profile is requested
authorAlex Converse <alex.converse@gmail.com>
Fri, 2 Apr 2010 16:26:10 +0000 (16:26 +0000)
committerAlex Converse <alex.converse@gmail.com>
Fri, 2 Apr 2010 16:26:10 +0000 (16:26 +0000)
Originally committed as revision 22784 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/aacenc.c

index eb32d1464cae05c3e962774196cefe0bd3b18841..6b836ae79f60e6be0b1325011080a87eb06328e9 100644 (file)
@@ -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);