From 08d8029ea89a3a4ae3e1fa509a35d4b7a8a406a2 Mon Sep 17 00:00:00 2001
From: Paul B Mahol <onemda@gmail.com>
Date: Mon, 30 Jan 2012 13:58:50 +0000
Subject: [PATCH] swscale: more generic check for planar destination formats
 with alpha

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
---
 libswscale/swscale.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 05ee8a4d91..eaec1dd82c 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -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