[FFmpeg-cvslog] swscale: correctly pad destination buffer in rgb conversion

Kostya Shishkov git at videolan.org
Mon Aug 4 21:23:16 CEST 2014


ffmpeg | branch: master | Kostya Shishkov <kostya.shishkov at gmail.com> | Sun Aug  3 10:28:49 2014 +0100| [5420099cab1e915b191cceccec4364f54cec6e52] | committer: Vittorio Giovara

swscale: correctly pad destination buffer in rgb conversion

Bug-Id: 772
CC: libav-stable at libav.org
Found-By: Justin Ruggles <justin.ruggles at gmail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5420099cab1e915b191cceccec4364f54cec6e52
---

 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 02850ea..a1ccc5a 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;



More information about the ffmpeg-cvslog mailing list