• wm4's avatar
    movtextdec: fix handling of UTF-8 subtitles · b0644c3e
    wm4 authored
    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.
    b0644c3e
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
fftools Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
configure Loading commit data...