[libav-devel] [PATCH 2/2] imgutils: Fix a typo in avcodec_get_pix_fmt_loss

Anton Khirnov anton at khirnov.net
Wed Aug 19 21:54:28 CEST 2015


Quoting Luca Barbato (2015-08-18 16:22:20)
> If the candidate does not have alpha and the source does have alpha
> report the loss of alpha.
> 
> CC: libav-stable at libav.org
> ---
>  libavcodec/imgconvert.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
> index 1f6d587..6b389ac 100644
> --- a/libavcodec/imgconvert.c
> +++ b/libavcodec/imgconvert.c
> @@ -76,7 +76,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))
> -- 
> 2.5.0
> 

Ok

-- 
Anton Khirnov


More information about the libav-devel mailing list