Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-12-24 23:46:15 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2016-01-15 14:30:40 +0300
commit0a6324fe9315e2a7dc5a5fe377f54ff17056f74c (patch)
tree2dd51ee24c09ecb5509412893c2a66a92dd7000f /libswscale/utils.c
parent2f65366c112d27c8c6078a3288c58cb202c65bd3 (diff)
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>
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r--libswscale/utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 2a88dc96f7..5610701136 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -1786,6 +1786,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);