From 2a691d1ede42e8466f1f880c390659d1f0145e94 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 21 Jan 2015 21:49:15 +0100 Subject: video: try to keep implied alpha when using conversion filters Don't just discard alpha. This probably does the right thing, in the rare situations when alpha matters at all. --- video/img_format.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/img_format.c b/video/img_format.c index db130ad67e..f717ff9c1e 100644 --- a/video/img_format.c +++ b/video/img_format.c @@ -281,7 +281,7 @@ int mp_imgfmt_select_best(int dst1, int dst2, int src) enum AVPixelFormat dst2pxf = imgfmt2pixfmt(dst2); enum AVPixelFormat srcpxf = imgfmt2pixfmt(src); enum AVPixelFormat dstlist[] = {dst1pxf, dst2pxf, AV_PIX_FMT_NONE}; - return pixfmt2imgfmt(avcodec_find_best_pix_fmt_of_list(dstlist, srcpxf, 0, 0)); + return pixfmt2imgfmt(avcodec_find_best_pix_fmt_of_list(dstlist, srcpxf, 1, 0)); } #if 0 -- cgit v1.2.3