summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-09-18 00:49:55 +0200
committerwm4 <wm4@nowhere>2014-09-18 00:49:55 +0200
commit6c3d25e6f5f09a110ad0fffaeeea6a65ee5d228b (patch)
treee904c8cd346ccbd640412d1e9f628fff9197b526 /player/command.c
parenta522441bbe6817798ca58b93d7adb180a9598640 (diff)
downloadmpv-6c3d25e6f5f09a110ad0fffaeeea6a65ee5d228b.tar.bz2
mpv-6c3d25e6f5f09a110ad0fffaeeea6a65ee5d228b.tar.xz
command: allow using ASS tags on OSD messages
We don't allow this by default, because it would be silly if random external data (like filenames or file tags) could accidentally trigger them. Add a property that magically disables this ASS tag escaping. Note that malicious input could still disable ASS tag escaping by itself. This would be annoying but harmless.
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c
index 8c2856c360..5a523663e8 100644
--- a/player/command.c
+++ b/player/command.c
@@ -2229,6 +2229,17 @@ static int mp_property_osd_sym(void *ctx, struct m_property *prop,
return m_property_strdup_ro(action, arg, temp);
}
+static int mp_property_osd_ass(void *ctx, struct m_property *prop,
+ int action, void *arg)
+{
+ struct m_sub_property props[] = {
+ {"0", SUB_PROP_STR(osd_ass_0)},
+ {"1", SUB_PROP_STR(osd_ass_1)},
+ {0}
+ };
+ return m_property_read_sub(props, action, arg);
+}
+
/// Video fps (RO)
static int mp_property_fps(void *ctx, struct m_property *prop,
int action, void *arg)
@@ -2816,6 +2827,7 @@ static const struct m_property mp_properties[] = {
{"osd-par", mp_property_osd_par},
{"osd-sym-cc", mp_property_osd_sym},
+ {"osd-ass-cc", mp_property_osd_ass},
// Subs
{"sid", mp_property_sub},