1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-18 05:37:04 +00:00

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.
This commit is contained in:
wm4 2015-01-21 21:49:15 +01:00
parent 3f49c60762
commit 2a691d1ede

View File

@ -281,7 +281,7 @@ int mp_imgfmt_select_best(int dst1, int dst2, int src)
enum AVPixelFormat dst2pxf = imgfmt2pixfmt(dst2); enum AVPixelFormat dst2pxf = imgfmt2pixfmt(dst2);
enum AVPixelFormat srcpxf = imgfmt2pixfmt(src); enum AVPixelFormat srcpxf = imgfmt2pixfmt(src);
enum AVPixelFormat dstlist[] = {dst1pxf, dst2pxf, AV_PIX_FMT_NONE}; 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 #if 0