From a33b46194c3525cb585cc78b449ec275dbfd7f83 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 3 Feb 2015 21:00:21 +0100 Subject: vo_opengl: disable alpha by default This reverts the default behavior introduced in commit 93feffad. Way too often libavcodec will return RGB data that has an alpha channel as per pixel format, but actually contains garbage. On the other hand, this will actually render garbage color values in e.g. PNG files (for pixels with alpha==0, the color value should be essentially ignored, which is what the old alpha blend mode did). This "fixes" #1528, which is probably a decoder bug (or far less likely, a broken file). --- DOCS/man/vo.rst | 2 +- video/out/gl_video.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DOCS/man/vo.rst b/DOCS/man/vo.rst index a67bfec1a9..32bc600ec4 100644 --- a/DOCS/man/vo.rst +++ b/DOCS/man/vo.rst @@ -557,7 +557,7 @@ Available video output drivers are: Sizes must be a power of two, and 512 at most. ``alpha=`` - Decides what to do if the input has an alpha component (default: blend). + Decides what to do if the input has an alpha component (default: no). blend Blend the frame against a black background. diff --git a/video/out/gl_video.c b/video/out/gl_video.c index 64cd4bc707..cfc85593b1 100644 --- a/video/out/gl_video.c +++ b/video/out/gl_video.c @@ -323,7 +323,7 @@ const struct gl_video_opts gl_video_opts_def = { .scalers = { "bilinear", "bilinear" }, .scaler_params = {{NAN, NAN}, {NAN, NAN}}, .scaler_radius = {3, 3}, - .alpha_mode = 2, + .alpha_mode = 0, .background = {0, 0, 0, 255}, .gamma = 1.0f, }; @@ -341,7 +341,7 @@ const struct gl_video_opts gl_video_opts_hq_def = { .dscaler = "mitchell", .scaler_params = {{NAN, NAN}, {NAN, NAN}}, .scaler_radius = {3, 3}, - .alpha_mode = 2, + .alpha_mode = 0, .background = {0, 0, 0, 255}, .gamma = 1.0f, }; -- cgit v1.2.3