On Sun, Aug 03, 2014 at 06:55:48PM +0200, Diego Biurrun wrote:
> On Sun, Aug 03, 2014 at 01:14:07AM +0100, Vittorio Giovara wrote:
> > --- a/libavcodec/huffyuvdec.c
> > +++ b/libavcodec/huffyuvdec.c
> > @@ -190,13 +195,15 @@ static int read_huffman_tables(HYuvContext *s, const 
> > uint8_t *src, int length)
> >          ff_free_vlc(&s->vlc[i]);
> > -        init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1,
> > -                 s->bits[i], 4, 4, 0);
> > +        ret = init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1,
> > +                       s->bits[i], 4, 4, 0);
> > +        if (ret < 0)
> > +            return ret;
> >      }
> >  
> > -    generate_joint_tables(s);
> > +    ret = generate_joint_tables(s);
> >  
> > -    return (get_bits_count(&gb) + 7) / 8;
> > +    return ret < 0 ? ret : (get_bits_count(&gb) + 7) / 8;
> >  }
> 
> I'd avoid the ternary operator here.
> 
> LGTM

I take back the LGTM, patchset coming up...

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to