swscale/utils: Fix intermediate format for cascaded alpha downscaling

Fixes Ticket4926

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/141/merge
Michael Niedermayer 9 years ago
parent 4bec36f98c
commit b83d8be6bf
  1. 3
      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);

Loading…
Cancel
Save