A user option is being checked and adjusted, don't just warn about about the failed range check, but also mention the adjustment.
Signed-off-by: Moritz Barsnick <barsn...@gmx.net> --- libavcodec/libfdk-aacenc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c index 98a817b..5f84fb2 100644 --- a/libavcodec/libfdk-aacenc.c +++ b/libavcodec/libfdk-aacenc.c @@ -185,11 +185,12 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) } if (avctx->flags & AV_CODEC_FLAG_QSCALE || s->vbr) { - int mode = s->vbr ? s->vbr : avctx->global_quality; + int modenew, mode = s->vbr ? s->vbr : avctx->global_quality; if (mode < 1 || mode > 5) { + modenew = av_clip(mode, 1, 5); av_log(avctx, AV_LOG_WARNING, - "VBR quality %d out of range, should be 1-5\n", mode); - mode = av_clip(mode, 1, 5); + "VBR quality %d is out of range, should be 1-5, using %d\n", mode, modenew); + mode = modenew; } av_log(avctx, AV_LOG_WARNING, "Note, the VBR setting is unsupported and only works with " -- 2.9.3 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel