summaryrefslogtreecommitdiffstats
path: root/video/zimg.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/zimg.c')
-rw-r--r--video/zimg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/zimg.c b/video/zimg.c
index 635696f686..2f52537c07 100644
--- a/video/zimg.c
+++ b/video/zimg.c
@@ -1137,7 +1137,8 @@ static bool setup_format_ne(zimg_image_format *zfmt, struct mp_zimg_repack *r,
r->z_planes[3] = n; // alpha, always plane 4 in zimg
#if HAVE_ZIMG_ALPHA
- zfmt->alpha = ZIMG_ALPHA_STRAIGHT;
+ zfmt->alpha = fmt.alpha == MP_ALPHA_PREMUL
+ ? ZIMG_ALPHA_PREMULTIPLIED : ZIMG_ALPHA_STRAIGHT;
#else
return false;
#endif