mirror of https://github.com/mpv-player/mpv
2aa5964b43
The header probing hacks were previously all broken. They only worked the first time the archive file was open. Since subsequent opens (on seek) occured in the middle of the source stream rather than at the beginning, the stream_read_peek calls meant to retrieve the headers were instead returning random bytes in the middle of the file. Perhaps the worst manifestation of this was when seeking within a multi-volume .rar archive with the "legacy" file naming pattern. If the seek required a reopen, the fact that the archive was multi-volume would be forgotten and the file would appear truncated terminating playback. To solve this, only perform the header probling the first time the archive is opened. Save the results and reuse them on subsequent reopens. Put this in a wrapper so this is transparent to demux_libarchive. |
||
---|---|---|
.. | ||
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 |