diff options
author | Grigori Goronzy <greg@blackbox> | 2012-03-11 06:04:59 +0100 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2012-03-11 06:04:59 +0100 |
commit | 2ba300123f7e6e5b9bbc69976ca4017993af694b (patch) | |
tree | a5b8b83ee77a63c71595ddf0abec6f1811954f7f /libass/ass.c | |
parent | 94b4c0d87182cd0bc84cf49cb793a0ab184df502 (diff) | |
download | libass-2ba300123f7e6e5b9bbc69976ca4017993af694b.tar.bz2 libass-2ba300123f7e6e5b9bbc69976ca4017993af694b.tar.xz |
Support \rSTYLENAME syntax
This allows to reset to a certain style, instead of the default style
for the current line. For some reason, this was completely missing.
Diffstat (limited to 'libass/ass.c')
-rw-r--r-- | libass/ass.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/libass/ass.c b/libass/ass.c index 712c16c..bc05d69 100644 --- a/libass/ass.c +++ b/libass/ass.c @@ -191,30 +191,6 @@ static void set_default_style(ASS_Style *style) style->MarginL = style->MarginR = style->MarginV = 20; } -/** - * \brief find style by name - * \param track track - * \param name style name - * \return index in track->styles - * Returnes 0 if no styles found => expects at least 1 style. - * Parsing code always adds "Default" style in the end. - */ -static int lookup_style(ASS_Track *track, char *name) -{ - int i; - if (*name == '*') - ++name; // FIXME: what does '*' really mean ? - for (i = track->n_styles - 1; i >= 0; --i) { - if (strcmp(track->styles[i].Name, name) == 0) - return i; - } - i = track->default_style; - ass_msg(track->library, MSGL_WARN, - "[%p]: Warning: no style named '%s' found, using '%s'", - track, name, track->styles[i].Name); - return i; // use the first style -} - static uint32_t string2color(ASS_Library *library, char *p) { uint32_t tmp; |