[FFmpeg-devel] [PATCH 2/3] avcodec/mlpdec: Use get_bits() instead of get_bits_long() when possible
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Wed Jan 5 23:38:34 EET 2022
huff_lsbs is guaranteed to be in the range of 0..24 and
so is lsb_bits here, so one can use get_bits().
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavcodec/mlpdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index 29fac54542..61b9a641dd 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -268,7 +268,7 @@ static inline int read_huff_channels(MLPDecodeContext *m, GetBitContext *gbp,
return AVERROR_INVALIDDATA;
if (lsb_bits > 0)
- result = (result << lsb_bits) + get_bits_long(gbp, lsb_bits);
+ result = (result << lsb_bits) + get_bits(gbp, lsb_bits);
result += cp->sign_huff_offset;
result *= 1 << quant_step_size;
--
2.32.0
More information about the ffmpeg-devel
mailing list