swscale: more generic check for planar destination formats with alpha
authorPaul B Mahol <onemda@gmail.com>
Mon, 30 Jan 2012 13:58:50 +0000 (13:58 +0000)
committerRonald S. Bultje <rsbultje@gmail.com>
Mon, 30 Jan 2012 15:37:13 +0000 (07:37 -0800)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
libswscale/swscale.c

index 05ee8a4d91f35ba6781a6f9ebe34c40f232c4c7e..eaec1dd82c74fe7843ebb1b7686e1c9c722339ff 100644 (file)
@@ -2672,7 +2672,7 @@ static int swScale(SwsContext *c, const uint8_t* src[],
         }
     }
 
-    if ((dstFormat == PIX_FMT_YUVA420P) && !alpPixBuf)
+    if (isPlanar(dstFormat) && isALPHA(dstFormat) && !alpPixBuf)
         fillPlane(dst[3], dstStride[3], dstW, dstY-lastDstY, lastDstY, 255);
 
 #if HAVE_MMX2