diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-07 12:28:37 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-08 18:24:40 +0100 |
commit | ed9be7dd470cd32fdb5baa886b048266f4cba28f (patch) | |
tree | 031e648c4d29178894d75fea9eb4cdf5ad667893 /libavcodec/pngdec.c | |
parent | 41a52740d47ac0b02e99ae90ff9212cce71753e7 (diff) | |
download | ffmpeg-ed9be7dd470cd32fdb5baa886b048266f4cba28f.tar.gz |
avcodec/x86/pngdsp: fix off by 1 error
This fixes artifacts in the last pixel of rows with some widths and pixel formats
Found-by: Dominique Leroux <Dominique.Leroux@autodesk.com>
Tested-by: Dominique Leroux <Dominique.Leroux@autodesk.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/pngdec.c')
-rw-r--r-- | libavcodec/pngdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index 60acd3f6a6..bc32eab211 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -274,7 +274,7 @@ static void png_filter_row(PNGDSPContext *dsp, uint8_t *dst, int filter_type, * the last pixel with bpp=3 */ int w = bpp == 4 ? size : size - 3; if (w > i) { - dsp->add_paeth_prediction(dst + i, src + i, last + i, w - i, bpp); + dsp->add_paeth_prediction(dst + i, src + i, last + i, size - i, bpp); i = w; } } |