swscale: fix stride used in planarToNv12Wrapper()
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 19 Nov 2013 13:19:22 +0000 (14:19 +0100)
committerAnton Khirnov <anton@khirnov.net>
Tue, 21 Jan 2014 16:54:40 +0000 (17:54 +0100)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libswscale/swscale_unscaled.c

index 3e5f49e..8c207b1 100644 (file)
@@ -147,10 +147,10 @@ static int planarToNv12Wrapper(SwsContext *c, const uint8_t *src[],
 
     if (c->dstFormat == AV_PIX_FMT_NV12)
         interleaveBytes(src[1], src[2], dst, c->srcW / 2, srcSliceH / 2,
-                        srcStride[1], srcStride[2], dstStride[0]);
+                        srcStride[1], srcStride[2], dstStride[1]);
     else
         interleaveBytes(src[2], src[1], dst, c->srcW / 2, srcSliceH / 2,
-                        srcStride[2], srcStride[1], dstStride[0]);
+                        srcStride[2], srcStride[1], dstStride[1]);
 
     return srcSliceH;
 }