[FFmpeg-devel] [PATCH] lavc/sunrastenc: consider cases with linesize < 0

Stefano Sabatini stefasab at gmail.com
Sun Mar 18 23:45:00 CET 2012


On date Sunday 2012-03-18 22:17:53 +0100, Michael Niedermayer encoded:
> On Sun, Mar 18, 2012 at 09:58:55PM +0100, Stefano Sabatini wrote:
[...]
> > @@ -83,32 +83,32 @@ static void sunrast_image_write_image(AVCodecContext *avctx,
> >       if (s->type == RT_BYTE_ENCODED) {
> >          uint8_t value, value2;
> >          int run;
> > -        const uint8_t *end = pixels + avctx->height * linesize;
> >  
> > +        y = 0;
> >          ptr = pixels;
> >  
> > -#define GET_VALUE ptr >= end ? 0 : x >= len ? ptr[len-1] : ptr[x]
> > +#define GET_VALUE(x) x >= FFABS(linesize) ? 0 : x >= len ? ptr[len-1] : ptr[x]
> 
> how can x become >=  FFABS(linesize) ?

Doh, forget the previous dead-brained patch.
-- 
FFmpeg = Fundamentalist and Foolish Most Pure EniGma
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-lavc-sunrastenc-consider-cases-with-linesize-0.patch
Type: text/x-diff
Size: 2419 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120318/28a23794/attachment.bin>


More information about the ffmpeg-devel mailing list