From af55db654b9156879b89d92306a17fb847713792 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 15 Jul 2013 01:48:25 +0200 Subject: sd_add: add terrible hack for (xy-)vsfilter compatibility Much has been said about this topic, we don't need to say even more. See additions to options.rst. --- core/mplayer.c | 6 ++++++ core/options.c | 3 +++ core/options.h | 1 + 3 files changed, 10 insertions(+) (limited to 'core') diff --git a/core/mplayer.c b/core/mplayer.c index 95a31aa15b..dafa68172b 100644 --- a/core/mplayer.c +++ b/core/mplayer.c @@ -1746,6 +1746,12 @@ static void update_subtitles(struct MPContext *mpctx, double refpts_tl) assert(track && sh_sub); struct dec_sub *dec_sub = sh_sub->dec_sub; + if (mpctx->sh_video) { + struct mp_image_params params; + if (get_video_params(mpctx->sh_video, ¶ms) > 0) + sub_control(dec_sub, SD_CTRL_SET_VIDEO_PARAMS, ¶ms); + } + mpctx->osd->video_offset = track->under_timeline ? mpctx->video_offset : 0; double refpts_s = refpts_tl - mpctx->osd->video_offset; diff --git a/core/options.c b/core/options.c index c28817db68..09b2f4aad6 100644 --- a/core/options.c +++ b/core/options.c @@ -500,6 +500,8 @@ const m_option_t mp_opts[] = { OPT_FLOATRANGE("ass-line-spacing", ass_line_spacing, 0, -1000, 1000), OPT_FLAG("ass-use-margins", ass_use_margins, 0), OPT_FLAG("ass-vsfilter-aspect-compat", ass_vsfilter_aspect_compat, 0), + OPT_CHOICE("ass-vsfilter-color-compat", ass_vsfilter_color_compat, 0, + ({"no", 0}, {"basic", 1}, {"full", 2}, {"force-601", 3})), OPT_FLAG("embeddedfonts", use_embedded_fonts, 0), OPT_STRINGLIST("ass-force-style", ass_force_style_list, 0), OPT_STRING("ass-styles", ass_styles_file, 0), @@ -791,6 +793,7 @@ const struct MPOpts mp_default_opts = { #endif .sub_scale = 1, .ass_vsfilter_aspect_compat = 1, + .ass_vsfilter_color_compat = 1, .ass_style_override = 1, .use_embedded_fonts = 1, .suboverlap_enabled = 0, diff --git a/core/options.h b/core/options.h index 1088ee78c1..cfc786262e 100644 --- a/core/options.h +++ b/core/options.h @@ -190,6 +190,7 @@ typedef struct MPOpts { float ass_line_spacing; int ass_use_margins; int ass_vsfilter_aspect_compat; + int ass_vsfilter_color_compat; int use_embedded_fonts; char **ass_force_style_list; char *ass_styles_file; -- cgit v1.2.3