avformat/assdec: UTF-16 support
authorwm4 <nfxjfg@googlemail.com>
Tue, 2 Sep 2014 18:48:45 +0000 (20:48 +0200)
committerClément Bœsch <u@pkh.me>
Fri, 5 Sep 2014 21:13:07 +0000 (23:13 +0200)
commit3e8426170ce005c111dfcae7982e18b647b7383f
tree2c99e5e08a455bba9b3b411134118d0d2c693c49
parentdcb29d37d4ffedc84e44df99f8d22ecf27e0f2cd
avformat/assdec: UTF-16 support

Use the UTF-16 BOM to detect UTF-16 encoding. Convert the file contents
to UTF-8 on the fly using FFTextReader, which acts as converting wrapper
around AVIOContext. It also can work on a static buffer, needed for
format probing. The FFTextReader wrapper now also takes care of skipping
the UTF-8 BOM.

Fix Ticket #3496.
libavformat/assdec.c
libavformat/subtitles.c
libavformat/subtitles.h