diff options
author | wm4 <wm4@nowhere> | 2015-03-06 13:14:39 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-03-06 13:14:39 +0100 |
commit | 24ea56a20e760e23c2bfd02377d2d0d1c1523c23 (patch) | |
tree | e6558ea707da11a7427b99ab297d6930b7750c48 /libass/ass_parse.c | |
parent | 51a93b5571acf51d3c7fe841d3e1e34720524c23 (diff) | |
download | libass-24ea56a20e760e23c2bfd02377d2d0d1c1523c23.tar.bz2 libass-24ea56a20e760e23c2bfd02377d2d0d1c1523c23.tar.xz |
Refine list of tags that prevent selective style overrides
Somewhat stolen from:
https://github.com/Cyberbeing/xy-VSFilter/blob/xy_sub_filter_rc3/src/subtitles/RTS.cpp#L2004
(xy-VSFilter started work on this in commit 014da6d9766417d7886eb867c9f2c14038f2a226)
Diffstat (limited to 'libass/ass_parse.c')
-rw-r--r-- | libass/ass_parse.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libass/ass_parse.c b/libass/ass_parse.c index 641d42c3..a639dc58 100644 --- a/libass/ass_parse.c +++ b/libass/ass_parse.c @@ -1070,9 +1070,9 @@ unsigned get_next_char(ASS_Renderer *render_priv, char **str) return chr; } -// Return 1 if the event contains tags that will put the renderer into the -// EVENT_POSITIONED state. Return 0 otherwise. -int event_is_positioned(char *str) +// Return 1 if the event contains tags that will apply overrides the selective +// style override code should not touch. Return 0 otherwise. +int event_has_hard_overrides(char *str) { // look for \pos and \move tags inside {...} // mirrors get_next_char, but is faster and doesn't change any global state @@ -1084,7 +1084,10 @@ int event_is_positioned(char *str) while (*str && *str != '}') { if (*str == '\\') { char *p = str + 1; - if (mystrcmp(&p, "pos") || mystrcmp(&p, "move")) + if (mystrcmp(&p, "pos") || mystrcmp(&p, "move") || + mystrcmp(&p, "clip") || mystrcmp(&p, "iclip") || + mystrcmp(&p, "org") || mystrcmp(&p, "pbo") || + mystrcmp(&p, "p")) return 1; } str++; |