[FFmpeg-cvslog] swscale/utils: Fix intermediate format for cascaded alpha downscaling

Michael Niedermayer git at videolan.org
Fri Jan 15 16:37:54 CET 2016


ffmpeg | branch: release/2.7 | Michael Niedermayer <michael at niedermayer.cc> | Thu Dec 24 21:46:15 2015 +0100| [d41b91ba33a52f8deac4d2e35b698b360de5666c] | committer: Michael Niedermayer

swscale/utils: Fix intermediate format for cascaded alpha downscaling

Fixes Ticket4926

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

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d41b91ba33a52f8deac4d2e35b698b360de5666c
---

 libswscale/utils.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libswscale/utils.c b/libswscale/utils.c
index 93cbad7..cc6402d 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -1598,6 +1598,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);
 



More information about the ffmpeg-cvslog mailing list