sws: dont write out of array on bigendian
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Thu, 14 Feb 2013 13:39:21 +0000 (14:39 +0100)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Thu, 14 Feb 2013 13:39:21 +0000 (14:39 +0100)
Fixes Ticket2229

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4e2c63685e031e28d2296cff76473b963ee62ba1)

libswscale/swscale_unscaled.c

index 9180f2e..375bc55 100644 (file)
@@ -631,6 +631,9 @@ static rgbConvFn findRgbConvFn(SwsContext *c)
         }
     }
 
+    if ((dstFormat == PIX_FMT_RGB32_1 || dstFormat == PIX_FMT_BGR32_1) && !isRGBA32(srcFormat) && ALT32_CORR<0)
+        return NULL;
+
     return conv;
 }