Browse Source

swscale/utils: Fix intermediate format for cascaded alpha downscaling

Fixes Ticket4926

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b83d8be6bf)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n2.8.5
Michael Niedermayer 10 years ago
parent
commit
0a6324fe93
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libswscale/utils.c

+ 3
- 0
libswscale/utils.c View File

@@ -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);



Loading…
Cancel
Save