From 5420099cab1e915b191cceccec4364f54cec6e52 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sun, 3 Aug 2014 10:28:49 +0100 Subject: [PATCH] swscale: correctly pad destination buffer in rgb conversion Bug-Id: 772 CC: libav-stable@libav.org Found-By: Justin Ruggles Signed-off-by: Vittorio Giovara --- libswscale/swscale_unscaled.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index 02850eac17..a1ccc5ab76 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -677,7 +677,7 @@ static int rgbToRgbWrapper(SwsContext *c, const uint8_t *src[], int srcStride[], if (dstStride[0] * srcBpp == srcStride[0] * dstBpp && srcStride[0] > 0 && !(srcStride[0] % srcBpp)) conv(srcPtr, dstPtr + dstStride[0] * srcSliceY, - srcSliceH * srcStride[0]); + (srcSliceH - 1) * srcStride[0] + c->srcW * srcBpp); else { int i; dstPtr += dstStride[0] * srcSliceY;