summaryrefslogtreecommitdiff
path: root/libswscale
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-09-10 14:03:01 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-09-10 15:00:19 +0200
commit816cf5181e35ebb595634762a45c7c94cd7b6760 (patch)
tree17ab08ec0b13b90e2b89c30cf802d42dcbc646a6 /libswscale
parentdfd3fd67bbfdfb01fd5fabc6fcea001694c0a97e (diff)
downloadffmpeg-816cf5181e35ebb595634762a45c7c94cd7b6760.tar.gz
swscale/utils: If the source has no alpha then disable alpha blendaway
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 354ec055f2..777f85e46b 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -1144,6 +1144,10 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
desc_src = av_pix_fmt_desc_get(srcFormat);
desc_dst = av_pix_fmt_desc_get(dstFormat);
+ // If the source has no alpha then disable alpha blendaway
+ if (c->src0Alpha)
+ c->alphablend = SWS_ALPHA_BLEND_NONE;
+
if (!(unscaled && sws_isSupportedEndiannessConversion(srcFormat) &&
av_pix_fmt_swap_endianness(srcFormat) == dstFormat)) {
if (!sws_isSupportedInput(srcFormat)) {