diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-20 01:09:16 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-20 01:15:51 +0400 |
commit | 13eff473adb00cc44d1a1800070f4c928e08b15b (patch) | |
tree | 5f930a80098e7326c1a8b36b89a1d8d63e426f70 /libswscale | |
parent | 1225b67fc9d769f04a4f7eea310402c1396748b6 (diff) |
swscale/swscale_unscaled: fix alpha values for rgb/bgr -> RGB32_1 / BGR32_1
Found-by: Justin Ruggles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/swscale_unscaled.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index 92b73575a0..8fb215752f 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -879,8 +879,13 @@ static int rgbToRgbWrapper(SwsContext *c, const uint8_t *src[], int srcStride[], srcPtr += ALT32_CORR; if ((dstFormat == AV_PIX_FMT_RGB32_1 || dstFormat == AV_PIX_FMT_BGR32_1) && - !isRGBA32(srcFormat)) + !isRGBA32(srcFormat)) { + int i; + av_assert0(ALT32_CORR == 1); + for (i = 0; i < srcSliceH; i++) + dstPtr[dstStride[0] * (srcSliceY + i)] = 255; dstPtr += ALT32_CORR; + } if (dstStride[0] * srcBpp == srcStride[0] * dstBpp && srcStride[0] > 0 && !(srcStride[0] % srcBpp) && !dst_bswap && !src_bswap) |