diff options
author | Nicolas George <nicola.george@normalesup.org> | 2007-05-02 13:49:08 +0000 |
---|---|---|
committer | Benoit Fouet <benoit.fouet@free.fr> | 2007-05-02 13:49:08 +0000 |
commit | 4f2c36ac4f3e6d7de02c95a484a005ea8cd561bf (patch) | |
tree | 9c43752623b1307298b768cdf856b0ed790c8895 /libavcodec/faac.c | |
parent | 711737af8eecd76ee001375884c83d5e91724135 (diff) | |
download | ffmpeg-streaming-4f2c36ac4f3e6d7de02c95a484a005ea8cd561bf.zip ffmpeg-streaming-4f2c36ac4f3e6d7de02c95a484a005ea8cd561bf.tar.gz |
add the possibility to choose aac profile
patch by Nicolas George nicolas george chez normalesup org
original thread: [Ffmpeg-devel] [PATCH] FAAC profile selection
date: 04/27/2007 08:11 PM
Originally committed as revision 8872 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/faac.c')
-rw-r--r-- | libavcodec/faac.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/libavcodec/faac.c b/libavcodec/faac.c index 9ff9f5e..ae1db1f 100644 --- a/libavcodec/faac.c +++ b/libavcodec/faac.c @@ -54,7 +54,25 @@ static int Faac_encode_init(AVCodecContext *avctx) } /* put the options in the configuration struct */ - faac_cfg->aacObjectType = LOW; + switch(avctx->profile) { + case FF_PROFILE_AAC_MAIN: + faac_cfg->aacObjectType = MAIN; + break; + case FF_PROFILE_UNKNOWN: + case FF_PROFILE_AAC_LOW: + faac_cfg->aacObjectType = LOW; + break; + case FF_PROFILE_AAC_SSR: + faac_cfg->aacObjectType = SSR; + break; + case FF_PROFILE_AAC_LTP: + faac_cfg->aacObjectType = LTP; + break; + default: + av_log(avctx, AV_LOG_ERROR, "invalid AAC profile\n"); + faacEncClose(s->faac_handle); + return -1; + } faac_cfg->mpegVersion = MPEG4; faac_cfg->useTns = 0; faac_cfg->allowMidside = 1; |