Commit c1521dd4 authored by Michael Niedermayer's avatar Michael Niedermayer

swscale/utils: Fix intermediate format for cascaded alpha downscaling

Fixes Ticket4926
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b83d8be6)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent a5b4b807
......@@ -1521,6 +1521,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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment