Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2020-02-04 17:07:06 +0300
committerMartin Storsjö <martin@martin.st>2020-02-11 12:40:09 +0300
commit5835adee248ff80e0c743fe454261ffa85f459a6 (patch)
tree0f8b30264e2dde8d3b7d9d58c4124e4ceeddbda8 /libavcodec/libfdk-aacdec.c
parent0f2b6594fc893c84e383e28136af5c9a3631e311 (diff)
libfdk-aacdec: Use the decoder's default level limiter settings
It was disabled by default in 2dbd35b00c6433e587d5f44d5dbc8972ebbaa88e as it added delay, but now we compensate for the delay properly by offsetting timestamps. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/libfdk-aacdec.c')
-rw-r--r--libavcodec/libfdk-aacdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/libfdk-aacdec.c b/libavcodec/libfdk-aacdec.c
index d9b080cf3e..ec7f236ce7 100644
--- a/libavcodec/libfdk-aacdec.c
+++ b/libavcodec/libfdk-aacdec.c
@@ -81,7 +81,8 @@ static const AVOption fdk_aac_dec_options[] = {
{ "drc_heavy", "Dynamic Range Control: heavy compression, where [1] is on (RF mode) and [0] is off",
OFFSET(drc_heavy), AV_OPT_TYPE_INT, { .i64 = -1}, -1, 1, AD, NULL },
#if FDKDEC_VER_AT_LEAST(2, 5) // 2.5.10
- { "level_limit", "Signal level limiting", OFFSET(level_limit), AV_OPT_TYPE_INT, { .i64 = 0 }, -1, 1, AD },
+ { "level_limit", "Signal level limiting",
+ OFFSET(level_limit), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, AD },
#endif
#if FDKDEC_VER_AT_LEAST(3, 0) // 3.0.0
{ "drc_effect","Dynamic Range Control: effect type, where e.g. [0] is none and [6] is general",
@@ -312,6 +313,7 @@ static av_cold int fdk_aac_decode_init(AVCodecContext *avctx)
}
#if FDKDEC_VER_AT_LEAST(2, 5) // 2.5.10
+ // Setting this parameter to -1 enables the auto behaviour in the library.
if (aacDecoder_SetParam(s->handle, AAC_PCM_LIMITER_ENABLE, s->level_limit) != AAC_DEC_OK) {
av_log(avctx, AV_LOG_ERROR, "Unable to set in signal level limiting in the decoder\n");
return AVERROR_UNKNOWN;