Commit Graph

2 Commits

Author SHA1 Message Date
wm4 5da89f8d2c demux_libass: do charset conversion by -subcp
Old code used to use libass' recoding feature, which is a copy of the
old MPlayer code. We dropped that a few commits ago. Unfortunately,
this made it impossible to load some subtitle files, like UTF-16 files.

Make .ass loading respect -subcp again. We do this by recoding the
probe buffer to UTF-8, and then trying to load it normally. (Yep.)

Since UTF-16 in particular will effectively half the probe buffer size,
double the probe size.
2013-06-25 00:11:56 +02:00
wm4 cfa45c40dc sub: add demux_libass wrapper, drop old hacks
demux_libass.c allows us to make subtitle format detection part of the
normal file loading process. libass has no probe function, but trying to
load the start of a file (the first 4 KB) is good enough. Hope that
libass can even handle random binary input gracefully without printing
stupid log messages, and that the libass parser doesn't accept too many
non-ASS files as input.

This doesn't handle the -subcp option correctly yet. This will be fixed
later.
2013-06-25 00:11:56 +02:00