From 06a66e7d9496adde91a54f3641eec321a093e5a5 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Mon, 26 Jun 2017 12:41:13 +0200 Subject: avcodec/imc: cast float to int prior to comparing with int variable Update FATE test. Fixes #3886. Signed-off-by: Paul B Mahol --- libavcodec/imc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/imc.c') diff --git a/libavcodec/imc.c b/libavcodec/imc.c index ac209206d1..7cd6db930b 100644 --- a/libavcodec/imc.c +++ b/libavcodec/imc.c @@ -828,7 +828,7 @@ static void imc_refine_bit_allocation(IMCContext *q, IMCChannel *chctx) for (j = band_tab[i]; j < band_tab[i + 1]; j++) chctx->sumLenArr[i] += chctx->CWlengthT[j]; if (chctx->bandFlagsBuf[i]) - if ((((band_tab[i + 1] - band_tab[i]) * 1.5) > chctx->sumLenArr[i]) && (chctx->sumLenArr[i] > 0)) + if (((int)((band_tab[i + 1] - band_tab[i]) * 1.5) > chctx->sumLenArr[i]) && (chctx->sumLenArr[i] > 0)) chctx->skipFlagRaw[i] = 1; } -- cgit v1.2.3