You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
swscale/utils: Fix intermediate format for cascaded alpha downscaling
Fixes Ticket4926 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -1803,6 +1803,9 @@ fail: // FIXME replace things by appropriate error codes
|
|||||||
int tmpH = sqrt(srcH * (int64_t)dstH);
|
int tmpH = sqrt(srcH * (int64_t)dstH);
|
||||||
enum AVPixelFormat tmpFormat = AV_PIX_FMT_YUV420P;
|
enum AVPixelFormat tmpFormat = AV_PIX_FMT_YUV420P;
|
||||||
|
|
||||||
|
if (isALPHA(srcFormat))
|
||||||
|
tmpFormat = AV_PIX_FMT_YUVA420P;
|
||||||
|
|
||||||
if (srcW*(int64_t)srcH <= 4LL*dstW*dstH)
|
if (srcW*(int64_t)srcH <= 4LL*dstW*dstH)
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user