summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-06-23 22:15:04 +0200
committerwm4 <wm4@nowhere>2013-06-25 00:11:56 +0200
commitf735a03346e8ec743bc89d5bdbaafd62dc0f084d (patch)
tree819054a1a641447742897388a0e03d13552ed946 /Makefile
parentfeb64c2717139f030974823756f51cbe215ef818 (diff)
downloadmpv-f735a03346e8ec743bc89d5bdbaafd62dc0f084d.tar.bz2
mpv-f735a03346e8ec743bc89d5bdbaafd62dc0f084d.tar.xz
sub: add subtitle charset conversion
This code was once part of subreader.c, then traveled to libass, and now made its way back to the fork of the fork of the original code, MPlayer. It works pretty much the same as subreader.c, except that we have to concatenate some packets to do auto-detection. This is rather annoying, but for all we know the actual source file could be a binary format. Unlike subreader.c, the iconv context is reopened on each packet. This is simpler, and with respect to multibyte encodings, more robust. Reopening is probably not a very fast, but I suspect subtitle charset conversion is not an operation that happens often or has to be fast. Also, this auto-detection is disabled for microdvd - this is the only format we know that has binary data in its packets, but is actually decoded to text. FFmpeg doesn't really allow us to solve this properly, because a) the input packets can be binary, and b) the output will be checked whether it's UTF-8, and if it's not, the output is thrown away and an error message is printed. We could just recode the decoded subtitles before sd_ass if it weren't for that.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 1fa78d676b..1c4c65a098 100644
--- a/Makefile
+++ b/Makefile
@@ -170,6 +170,7 @@ SOURCES = talloc.c \
core/av_log.c \
core/av_opts.c \
core/bstr.c \
+ core/charset_conv.c \
core/codecs.c \
core/command.c \
core/cpudetect.c \