aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/formats.c
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2018-03-24 15:41:54 +0100
committerwm4 <nfxjfg@googlemail.com>2018-03-25 19:27:02 +0200
commitb0644c3e1a96397ee5e2448c542fa4c3bc319537 (patch)
treeb08e9604d82001257ba73bdc4626953c6690b58b /libavfilter/formats.c
parentb7d0d912ef9b60eae962e4622d72860af31a8b00 (diff)
downloadffmpeg-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