[FFmpeg-devel] [PATCH] lavc/sunrastenc: consider cases with linesize < 0
Stefano Sabatini
stefasab at gmail.com
Mon Mar 19 19:10:27 CET 2012
On date Sunday 2012-03-18 23:57:34 +0100, Michael Niedermayer encoded:
> 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
Pushed.
--
FFmpeg = Friendly Free Murdering Pitiful Enchanting Gospel
More information about the ffmpeg-devel
mailing list