mpv/demux
wm4 a4cdf1a727 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.
2016-01-12 23:50:01 +01:00
..
codec_tags.c demux: merge sh_video/sh_audio/sh_sub 2016-01-12 23:48:19 +01:00
codec_tags.h demux: merge sh_video/sh_audio/sh_sub 2016-01-12 23:48:19 +01:00
cue.c mpv_talloc.h: rename from talloc.h 2016-01-11 21:05:55 +01:00
cue.h demux: check embedded cuesheet refers to only one file 2015-12-17 12:38:57 -08:00
demux.c demux: merge sh_video/sh_audio/sh_sub 2016-01-12 23:48:19 +01:00
demux.h player: eliminate demux_get_next_pts() 2016-01-11 20:36:23 +01:00
demux_cue.c mpv_talloc.h: rename from talloc.h 2016-01-11 21:05:55 +01:00
demux_disc.c demux: merge sh_video/sh_audio/sh_sub 2016-01-12 23:48:19 +01:00
demux_edl.c mpv_talloc.h: rename from talloc.h 2016-01-11 21:05:55 +01:00
demux_lavf.c demux_lavf: fix charset conversion with UTF-16 subtitles 2016-01-12 23:50:01 +01:00
demux_libarchive.c libarchive: remove redundant log prefix 2015-11-09 22:41:19 -08:00
demux_mf.c demux: merge sh_video/sh_audio/sh_sub 2016-01-12 23:48:19 +01:00
demux_mkv.c demux: merge sh_video/sh_audio/sh_sub 2016-01-12 23:48:19 +01:00
demux_mkv_timeline.c demux: merge sh_video/sh_audio/sh_sub 2016-01-12 23:48:19 +01:00
demux_playlist.c player: warn against using HLS URLs with --playlist 2015-08-04 17:51:00 +02:00
demux_rar.c demux: fix rar support for files containing DTS audio tracks 2015-03-24 21:29:09 +01:00
demux_raw.c demux: merge sh_video/sh_audio/sh_sub 2016-01-12 23:48:19 +01:00
demux_tv.c demux: merge sh_video/sh_audio/sh_sub 2016-01-12 23:48:19 +01:00
ebml.c mpv_talloc.h: rename from talloc.h 2016-01-11 21:05:55 +01:00
ebml.h Update license headers 2015-04-13 12:10:01 +02:00
matroska.h demux_mkv: remove indirection through defines 2015-06-19 21:41:57 +02:00
packet.c demux_mkv: refactor packet parsing 2015-02-05 21:52:07 +01:00
packet.h Update license headers 2015-04-13 12:10:01 +02:00
stheader.h demux: merge sh_video/sh_audio/sh_sub 2016-01-12 23:48:19 +01:00
timeline.c demux: timeline: honor quit requests 2015-02-20 22:08:02 +01:00
timeline.h demux: timeline: honor quit requests 2015-02-20 22:08:02 +01:00