On Wed, May 11, 2011 at 12:22:14PM +0200, Stefano Sabatini wrote:
> On date Wednesday 2011-05-11 11:47:14 +0200, Kostya encoded:
> > On Mon, May 09, 2011 at 09:59:20PM +0200, Stefano Sabatini wrote:
> > > Fix decoding of file b.tif, trac issue #168.
> > > --- a/libavcodec/tiff.c
> > > +++ b/libavcodec/tiff.c
> > > @@ -162,13 +162,20 @@ static int tiff_unpack_strip(TiffContext *s, 
> > > uint8_t* dst, int stride, const uin
> > >          return ret;
> > >      }
> > >      for(line = 0; line < lines; line++){
> > > +        int i;
> > > +
> > >          if(src - ssrc > size){
> > >              av_log(s->avctx, AV_LOG_ERROR, "Source data overread\n");
> > >              return -1;
> > >          }
> > >          switch(s->compr){
> > >          case TIFF_RAW:
> > > -            memcpy(dst, src, width);
> > > +            if (!s->fill_order) {
> > > +                memcpy(dst, src, width);
> > > +            } else {
> > > +                for (i = 0; i < width; i++)
> > > +                    dst[i] = av_reverse[src[i]];
> > > +            }
> > >              src += width;
> > >              break;
> > >          case TIFF_PACKBITS:
> > > -- 
> > 
> > looks ok (though you can move "int i;" declaration inside else{} block IMO)
> 
> Sure, updated.

Pushed - thanks Stefano.

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

Reply via email to