[FFmpeg-cvslog] libaacplus: support for float sample format
Paul B Mahol
git at videolan.org
Tue Apr 16 18:14:16 CEST 2013
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Apr 16 16:12:17 2013 +0000| [657553917691623eb0287ce8f1b649e161936dc9] | committer: Paul B Mahol
libaacplus: support for float sample format
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=657553917691623eb0287ce8f1b649e161936dc9
---
libavcodec/libaacplus.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/libaacplus.c b/libavcodec/libaacplus.c
index 65b90f6..5b67778 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,
More information about the ffmpeg-cvslog
mailing list