diff options
author | wm4 <nfxjfg@googlemail.com> | 2017-07-03 13:42:44 +0200 |
---|---|---|
committer | wm4 <nfxjfg@googlemail.com> | 2017-07-06 10:04:55 +0200 |
commit | f605b56ad9c5965792359e5474238e318aed1399 (patch) | |
tree | 6e747074d628e314c7b079a62ae862c92059c7d2 /libavcodec | |
parent | f1baafac7129c3bb8d4abaaa899988c7a51ca5cd (diff) | |
download | ffmpeg-f605b56ad9c5965792359e5474238e318aed1399.tar.gz |
htmlsubtitles: support <br> tag
Some .srt files use this tag.
(An alternative implementation would be correctly ignoring unknown tags,
and treating them as whitespace. libass can do automatic line wrapping.)
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/htmlsubtitles.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/htmlsubtitles.c b/libavcodec/htmlsubtitles.c index be5c9316ca..fe991678d5 100644 --- a/libavcodec/htmlsubtitles.c +++ b/libavcodec/htmlsubtitles.c @@ -167,6 +167,8 @@ int ff_htmlmarkup_to_ass(void *log_ctx, AVBPrint *dst, const char *in) } } else if (tagname[0] && !tagname[1] && strspn(tagname, "bisu") == 1) { av_bprintf(dst, "{\\%c%d}", tagname[0], !tag_close); + } else if (!strcmp(tagname, "br")) { + av_bprintf(dst, "\\N"); } else { unknown = 1; snprintf(tmp, sizeof(tmp), "</%s>", tagname); |