summaryrefslogtreecommitdiff
path: root/libswscale
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-12-24 21:46:15 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2015-12-24 21:46:15 +0100
commitb83d8be6bff7d645469a623aee0b380541da15cf (patch)
tree9efdc46d2b844fb9195536deb8bf4c502ea2afc6 /libswscale
parent4bec36f98c5150b09d45740f3e1c80526e85b676 (diff)
swscale/utils: Fix intermediate format for cascaded alpha downscaling
Fixes Ticket4926 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index db937b160f..e5593af4dd 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -1803,6 +1803,9 @@ fail: // FIXME replace things by appropriate error codes
int tmpH = sqrt(srcH * (int64_t)dstH);
enum AVPixelFormat tmpFormat = AV_PIX_FMT_YUV420P;
+ if (isALPHA(srcFormat))
+ tmpFormat = AV_PIX_FMT_YUVA420P;
+
if (srcW*(int64_t)srcH <= 4LL*dstW*dstH)
return AVERROR(EINVAL);