[FFmpeg-devel] [PATCH] avcodec/lagarith: use VLC for probe code length
Paul B Mahol
onemda at gmail.com
Thu Sep 14 16:35:50 EEST 2023
On Thu, Sep 14, 2023 at 3:34 PM Andreas Rheinhardt <
andreas.rheinhardt at outlook.com> wrote:
> Paul B Mahol:
> > + unsigned val, bits;
> > +
> > + bits = get_vlc2(gb, lag_tab.table, VLC_BITS, 3);
> > + if (bits > 31) {
> > *value = 0;
> > return AVERROR_INVALIDDATA;
>
> Using a signed int and checking for zero is simpler.
> And the depth of this VLC is 1, not 3.
>
There is 32 symbol value bit length, that current code ignores too.
>
> - Andreas
>
> _______________________________________________
> 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