diff options
author | wm4 <nfxjfg@googlemail.com> | 2018-03-24 15:41:54 +0100 |
---|---|---|
committer | wm4 <nfxjfg@googlemail.com> | 2018-03-25 19:27:02 +0200 |
commit | b0644c3e1a96397ee5e2448c542fa4c3bc319537 (patch) | |
tree | b08e9604d82001257ba73bdc4626953c6690b58b /libavfilter/formats.c | |
parent | b7d0d912ef9b60eae962e4622d72860af31a8b00 (diff) | |
download | ffmpeg-b0644c3e1a96397ee5e2448c542fa4c3bc319537.tar.gz |
movtextdec: fix handling of UTF-8 subtitles
Subtitles which contained styled UTF-8 subtitles (i.e. not just 7 bit
ASCII characters) were not handled correctly. The spec mandates that
styling start/end ranges are in "characters". It's not quite clear what
a "character" is supposed to be, but maybe they mean unicode codepoints.
FFmpeg's decoder treated the style ranges as byte idexes, which could
lead to UTF-8 sequences being broken, and the common code dropping the
whole subtitle line.
Change this and count the codepoint instead. This also means that even
if this is somehow wrong, the decoder won't break UTF-8 sequences
anymore. The sample which led me to investigate this now appears to work
correctly.
Diffstat (limited to 'libavfilter/formats.c')
0 files changed, 0 insertions, 0 deletions