From c314a68d0462bff9a7a1fae37b71f98dcb4e7c04 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 16 Oct 2024 14:43:04 +0200 Subject: [PATCH] avcodec/rangecoder: Do not loop renormalization Signed-off-by: Michael Niedermayer --- libavcodec/rangecoder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/rangecoder.h b/libavcodec/rangecoder.h index 110908d6bd..2248161bca 100644 --- a/libavcodec/rangecoder.h +++ b/libavcodec/rangecoder.h @@ -106,7 +106,7 @@ static inline void put_rac(RangeCoder *c, uint8_t *const state, int bit) *state = c->one_state[*state]; } - while (c->range < 0x100) + if (c->range < 0x100) renorm_encoder(c); }