Module: libav
Branch: release/11
Commit: b5e6e9cfca960797c812d4cb69f19f6348eec413

Author:    Luca Barbato <[email protected]>
Committer: Luca Barbato <[email protected]>
Date:      Tue Aug 18 16:18:30 2015 +0200

imgutils: Fix a typo in avcodec_get_pix_fmt_loss

If the candidate does not have alpha and the source does have alpha
report the loss of alpha.

CC: [email protected]

---

 libavcodec/imgconvert.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index 365dc54..fae469b 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -78,7 +78,7 @@ int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt,
         loss |= FF_LOSS_COLORSPACE;
 
     if (has_alpha && !(dst_desc->flags & AV_PIX_FMT_FLAG_ALPHA) &&
-         (dst_desc->flags & AV_PIX_FMT_FLAG_ALPHA))
+         (src_desc->flags & AV_PIX_FMT_FLAG_ALPHA))
         loss |= FF_LOSS_ALPHA;
 
     if (dst_pix_fmt == AV_PIX_FMT_PAL8 && !is_gray(src_desc))

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to