[FFmpeg-devel] [PATCH 3/7] avcodec/bonk: Remove special 32bit case from read_uint_max()

Paul B Mahol onemda at gmail.com
Sun Nov 6 20:28:48 EET 2022


On 11/6/22, Michael Niedermayer <michael at niedermayer.cc> wrote:
> This case seems not to match the reference decoder and it also
> seems not reachable
>
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
>  libavcodec/bonk.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/libavcodec/bonk.c b/libavcodec/bonk.c
> index 04ea4def2f..fca8c246aa 100644
> --- a/libavcodec/bonk.c
> +++ b/libavcodec/bonk.c
> @@ -136,8 +136,7 @@ static unsigned read_uint_max(BonkContext *s, uint32_t
> max)
>      if (max == 0)
>          return 0;
>
> -    if (max >> 31)
> -        return 32;
> +    av_assert0(max >> 31 == 0);
>
>      for (unsigned i = 1; i <= max - value; i+=i)
>          if (get_bits1(&s->gb))
> --
> 2.17.1


Not sure, at your risk.

Test lossy mode too.

>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-devel mailing list