diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-12-24 21:46:15 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-01-15 17:23:54 +0100 |
commit | bb70069e6a5c6786825234d44d808150784bb36b (patch) | |
tree | 1ca0416945b49e1b5ae6bde847a4c06e439034b1 | |
parent | b90796ab8627e78e4c02b050f0baadbd66cd2e16 (diff) | |
download | ffmpeg-bb70069e6a5c6786825234d44d808150784bb36b.tar.gz |
swscale/utils: Fix intermediate format for cascaded alpha downscaling
Fixes Ticket4926
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b83d8be6bff7d645469a623aee0b380541da15cf)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libswscale/utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index 71456db580..cb78c5981a 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1528,6 +1528,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); |