summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-02-03 21:00:21 +0100
committerwm4 <wm4@nowhere>2015-02-03 21:00:21 +0100
commita33b46194c3525cb585cc78b449ec275dbfd7f83 (patch)
tree083583624b1704482d1c34e09cbd49429a868ca8
parente6664e94a12991534b9217e677fed8515a3446d7 (diff)
downloadmpv-a33b46194c3525cb585cc78b449ec275dbfd7f83.tar.bz2
mpv-a33b46194c3525cb585cc78b449ec275dbfd7f83.tar.xz
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).
-rw-r--r--DOCS/man/vo.rst2
-rw-r--r--video/out/gl_video.c4
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=<blend|yes|no>``
- 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,
};