diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-04-16 16:12:17 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-04-16 16:14:05 +0000 |
commit | 657553917691623eb0287ce8f1b649e161936dc9 (patch) | |
tree | 026cfa470384acedd1c5a7b61f6b96ed21130021 /libavcodec/libaacplus.c | |
parent | 13bbfb8fda2123a076fede7bf9063490ed492ed9 (diff) | |
download | ffmpeg-657553917691623eb0287ce8f1b649e161936dc9.tar.gz |
libaacplus: support for float sample format
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/libaacplus.c')
-rw-r--r-- | libavcodec/libaacplus.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/libaacplus.c b/libavcodec/libaacplus.c index 65b90f6919..5b6777842c 100644 --- a/libavcodec/libaacplus.c +++ b/libavcodec/libaacplus.c @@ -66,7 +66,7 @@ static av_cold int aacPlus_encode_init(AVCodecContext *avctx) aacplus_cfg->bitRate = avctx->bit_rate; aacplus_cfg->bandWidth = avctx->cutoff; aacplus_cfg->outputFormat = !(avctx->flags & CODEC_FLAG_GLOBAL_HEADER); - aacplus_cfg->inputFormat = AACPLUS_INPUT_16BIT; + aacplus_cfg->inputFormat = avctx->sample_fmt == AV_SAMPLE_FMT_FLT ? AACPLUS_INPUT_FLOAT : AACPLUS_INPUT_16BIT; if (!aacplusEncSetConfiguration(s->aacplus_handle, aacplus_cfg)) { av_log(avctx, AV_LOG_ERROR, "libaacplus doesn't support this output format!\n"); return -1; @@ -139,6 +139,7 @@ AVCodec ff_libaacplus_encoder = { .encode2 = aacPlus_encode_frame, .close = aacPlus_encode_close, .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, + AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_NONE }, .long_name = NULL_IF_CONFIG_SMALL("libaacplus AAC+ (Advanced Audio Codec with SBR+PS)"), .profiles = profiles, |