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

Michael Niedermayer michaelni at gmx.at
Sun Mar 18 23:57:34 CET 2012


On Sun, Mar 18, 2012 at 11:45:00PM +0100, Stefano Sabatini wrote:
> 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

>  sunrastenc.c |   17 ++++++++---------
>  1 file changed, 8 insertions(+), 9 deletions(-)
> fd58baaa63ec515c2bfb8c2eb9bf021bb9fcb721  0002-lavc-sunrastenc-consider-cases-with-linesize-0.patch
> From 5f1c7d8a1f10f8470f62f8aed24a27fe9a13fa44 Mon Sep 17 00:00:00 2001
> From: Stefano Sabatini <stefasab at gmail.com>
> Date: Sun, 18 Mar 2012 16:55:53 +0100
> Subject: [PATCH] lavc/sunrastenc: consider cases with linesize < 0
> 
> Make sunrast_image_write_image() deal with cases when linesize is < 0.
> Fix trac ticket #1077.

LGTM

Thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120318/8213ad1d/attachment.asc>


More information about the ffmpeg-devel mailing list