summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-03 17:05:11 +0200
committerwm4 <wm4@nowhere>2016-09-03 17:12:53 +0200
commit4f263dce34822a3f8356f88fa736353a20fd0c8c (patch)
treeb67ba23fa637129581d5f8b54fceaa5c1787d513 /options
parent590caeb2bdeddd85aa86e4b08c05db058c538433 (diff)
downloadmpv-4f263dce34822a3f8356f88fa736353a20fd0c8c.tar.bz2
mpv-4f263dce34822a3f8356f88fa736353a20fd0c8c.tar.xz
sd_lavc: enable teletext
Whitelisting supported codecs is (probably) still better than just allowing everything, given the weird FFmpeg API. I'm also assuming Libav doesn't even have the codec ID, but I didn't check. Also add a --teletext-page option, since otherwise it decodes every teletext page and shows them in succession. And yes, we can't use av_opt_set_int() - instead we have to set it as string. Because FFmpeg's option system is terrible.
Diffstat (limited to 'options')
-rw-r--r--options/options.c2
-rw-r--r--options/options.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/options/options.c b/options/options.c
index ddebceef36..e00c46c676 100644
--- a/options/options.c
+++ b/options/options.c
@@ -469,6 +469,7 @@ const m_option_t mp_opts[] = {
OPT_SUBSTRUCT("osd", osd_style, osd_style_conf, 0),
OPT_SUBSTRUCT("sub-text", sub_text_style, sub_style_conf, 0),
OPT_FLAG("sub-clear-on-seek", sub_clear_on_seek, 0),
+ OPT_INTRANGE("teletext-page", teletext_page, 0, 1, 999),
//---------------------- libao/libvo options ------------------------
OPT_SETTINGSLIST("ao", audio_driver_list, 0, &ao_obj_list, ),
@@ -776,6 +777,7 @@ const struct MPOpts mp_default_opts = {
.sub_use_margins = 1,
.ass_scale_with_window = 0,
.sub_scale_with_window = 1,
+ .teletext_page = 100,
#if HAVE_LUA
.lua_load_osc = 1,
.lua_load_ytdl = 1,
diff --git a/options/options.h b/options/options.h
index 7d6701cd1e..96345e66f4 100644
--- a/options/options.h
+++ b/options/options.h
@@ -281,6 +281,7 @@ typedef struct MPOpts {
int ass_hinting;
int ass_shaper;
int sub_clear_on_seek;
+ int teletext_page;
int hwdec_api;
char *hwdec_codecs;