On Thu, Aug 04, 2016 at 11:43:38AM +0200, Diego Biurrun wrote:
> On Sat, Jul 30, 2016 at 02:17:54PM +0200, Anton Khirnov wrote:
> > Quoting Diego Biurrun (2016-06-09 17:12:42)
> > > --- a/libavcodec/tta.c
> > > +++ b/libavcodec/tta.c
> > > @@ -363,17 +363,17 @@ static int tta_decode_frame(AVCodecContext *avctx,
> > > void *data,
> > >
> > > - if (get_bits_left(&s->gb) < k) {
> > > + if (bitstream_bits_left(&s->bc) < k) {
> > > ret = AVERROR_INVALIDDATA;
> > > goto error;
> > > }
> > >
> > > if (k) {
> > > - if (k > MIN_CACHE_BITS) {
> > > + if (k > 32) {
> >
> > Shift by 32 is undefined behaviour.
>
> What do you suggest then? >=?
Or just hardcoding a magic 25 here, which is the MIN_CACHE_BITS value
for the non-long old bitstream reader.
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel