mirror of https://github.com/mpv-player/mpv
acac614032
It's 2023 and people don't use UTF-8 for their m3u, ini, etc. files. Well mpv already has the tools in place to try and guess other codepages, so we might as well use it I guess. This change is pretty awkward since we have to read line-by-line but mp_iconv_to_utf8 may sometimes allocate memory. So sometimes the bstr needs to be freed and sometimes not for every line. Also we need to make another copy of the line on the stack since splitting by tokens and such will mess up the original line which may possibly be allocated memory. The ugliness is mostly hidden in pl_free_line, but it's still weird. Fixes #10911. |
||
---|---|---|
.. | ||
cache.c | ||
cache.h | ||
codec_tags.c | ||
codec_tags.h | ||
cue.c | ||
cue.h | ||
demux.c | ||
demux.h | ||
demux_cue.c | ||
demux_disc.c | ||
demux_edl.c | ||
demux_lavf.c | ||
demux_libarchive.c | ||
demux_mf.c | ||
demux_mkv.c | ||
demux_mkv_timeline.c | ||
demux_null.c | ||
demux_playlist.c | ||
demux_raw.c | ||
demux_timeline.c | ||
ebml.c | ||
ebml.h | ||
matroska.h | ||
packet.c | ||
packet.h | ||
stheader.h | ||
timeline.c | ||
timeline.h |