On Wed, Jan 05, 2022 at 10:38:34PM +0100, Andreas Rheinhardt wrote:
> 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.rheinha...@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;

This seems not to fully work

Assertion n>0 && n<=25 failed at libavcodec/get_bits.h:403

lsb_bits and cp->huff_lsbs are 31 in this failure, it seems
the checks that prevent this are conditional but i didnt debug/check this
any further

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Observe your enemies, for they first find out your faults. -- Antisthenes

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to