avcodec/aacenc: dont use global quality if its negative

Some applications used a negative value as default for "not set"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-05-24 20:32:37 +02:00
parent 81aa0f4604
commit 9a7d332b92
1 changed files with 1 additions and 1 deletions

View File

@ -769,7 +769,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
if (HAVE_MIPSDSPR1)
ff_aac_coder_init_mips(s);
s->lambda = avctx->global_quality ? avctx->global_quality : 120;
s->lambda = avctx->global_quality > 0 ? avctx->global_quality : 120;
ff_aac_tableinit();