summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-01-12 23:50:01 +0100
committerwm4 <wm4@nowhere>2016-01-12 23:50:01 +0100
commita4cdf1a727a3d9d59ba200c944a7eb74806c752c (patch)
treea06dde6a56a0f1a22048aa4d7228f0d09cbe0f79 /stream
parente420464ba693a5920d4dc172b3f7e9a0c725e3d4 (diff)
downloadmpv-a4cdf1a727a3d9d59ba200c944a7eb74806c752c.tar.bz2
mpv-a4cdf1a727a3d9d59ba200c944a7eb74806c752c.tar.xz
demux_lavf: fix charset conversion with UTF-16 subtitles
UTF-16 subtitles are special in that they are usually read by libavformat directly, even though they are not in UTF-8. This is explicitly handled convert_charset() and skips conversion to UTF-8. There was a bug due to not resetting the file position: if conversion happens, the actual stream is replaced with a memory stream containing the converted data, but if conversion is skipped, the original stream with the wrong file position is kept. Fix by always opening a memory stream. (We _could_ seek back, but there is a slight possibility of additional failure due to unseekable streams.) Also, don't enter conversion if the subtitle is detected as UTF-8 either. Fixes #2700.
Diffstat (limited to 'stream')
0 files changed, 0 insertions, 0 deletions