[FFmpeg-cvslog] swscale: dont reshuffle bytes

Michael Niedermayer git at videolan.org
Fri May 6 15:20:19 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri May  6 13:18:55 2011 +0200| [7915e038c6ff70fd7b109a68c0064755648b0d14] | committer: Michael Niedermayer

swscale: dont reshuffle bytes
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libswscale/swscale.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index b72ed79..dff8e2a 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -1657,7 +1657,7 @@ static int rgbToRgbWrapper(SwsContext *c, const uint8_t* src[], int srcStride[],
         if ((dstFormat == PIX_FMT_RGB32_1 || dstFormat == PIX_FMT_BGR32_1) && !isRGBA32(srcFormat))
             dstPtr += ALT32_CORR;
 
-        if (dstStride[0]*srcBpp == srcStride[0]*dstBpp && srcStride[0] > 0)
+        if (dstStride[0]*srcBpp == srcStride[0]*dstBpp && srcStride[0] > 0 && !(srcStride[0]%srcBpp))
             conv(srcPtr, dstPtr + dstStride[0]*srcSliceY, srcSliceH*srcStride[0]);
         else {
             int i;



More information about the ffmpeg-cvslog mailing list