diff options
author | wm4 <wm4@nowhere> | 2015-04-11 19:16:34 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-04-11 19:22:10 +0200 |
commit | 2b679020f7b7ba957f92bcaabacf38d50b856810 (patch) | |
tree | 0cfbbb9dfda354d08730e26b090397dd469d0de9 /video | |
parent | 3bfdc20aa109ba191fd091daeaf9a0d380e71df9 (diff) | |
download | mpv-2b679020f7b7ba957f92bcaabacf38d50b856810.tar.bz2 mpv-2b679020f7b7ba957f92bcaabacf38d50b856810.tar.xz |
vo_opengl: unify blend-subtitles-res and blend-subtitles
Diffstat (limited to 'video')
-rw-r--r-- | video/out/gl_video.c | 14 | ||||
-rw-r--r-- | video/out/gl_video.h | 1 |
2 files changed, 7 insertions, 8 deletions
diff --git a/video/out/gl_video.c b/video/out/gl_video.c index a1f0bfbcc7..649a72a8bc 100644 --- a/video/out/gl_video.c +++ b/video/out/gl_video.c @@ -434,10 +434,10 @@ const struct m_sub_options gl_video_conf = { OPT_FLAG("rectangle-textures", use_rectangle, 0), OPT_COLOR("background", background, 0), OPT_FLAG("interpolation", interpolation, 0), - OPT_FLAG("blend-subtitles", blend_subs, 0), - OPT_CHOICE("blend-subtitles-res", blend_subs_res, 0, - ({"display", 0}, - {"video", 1})), + OPT_CHOICE("blend-subtitles", blend_subs, 0, + ({"no", 0}, + {"yes", 1}, + {"video", 2})), OPT_REMOVED("approx-gamma", "this is always enabled now"), OPT_REMOVED("cscale-down", "chroma is never downscaled"), @@ -1836,7 +1836,7 @@ static void pass_render_frame(struct gl_video *p) if (vpts == MP_NOPTS_VALUE) vpts = p->osd_pts; - if (p->osd && p->opts.blend_subs && p->opts.blend_subs_res == 1) { + if (p->osd && p->opts.blend_subs == 2) { double scale[2]; get_scale_factors(p, scale); struct mp_osd_res rect = { @@ -1851,7 +1851,7 @@ static void pass_render_frame(struct gl_video *p) pass_scale_main(p); - if (p->osd && p->opts.blend_subs && p->opts.blend_subs_res == 0) { + if (p->osd && p->opts.blend_subs == 1) { // Recreate the real video size from the src/dst rects int vp_w = p->dst_rect.x1 - p->dst_rect.x0, vp_h = p->dst_rect.y1 - p->dst_rect.y0; @@ -2274,7 +2274,7 @@ static void check_gl_features(struct gl_video *p) disabled[n_disabled++] = "interpolation (FBO)"; } if (p->opts.blend_subs && !test_fbo(p, &have_fbo)) { - p->opts.blend_subs = false; + p->opts.blend_subs = 0; disabled[n_disabled++] = "subtitle blending (FBO)"; } if (gl->es && p->opts.pbo) { diff --git a/video/out/gl_video.h b/video/out/gl_video.h index a757d99cc9..30647153b5 100644 --- a/video/out/gl_video.h +++ b/video/out/gl_video.h @@ -66,7 +66,6 @@ struct gl_video_opts { struct m_color background; int interpolation; int blend_subs; - int blend_subs_res; }; extern const struct m_sub_options gl_video_conf; |