mpv/demux
Kevin Mitchell 2aa5964b43
stream_libarchive: remember archive headers from initial open
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.
2020-04-28 22:13:03 -07:00
..
cache.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
cache.h demux: add a on-disk cache 2019-09-19 20:37:05 +02:00
codec_tags.c Remove remains of Libav compatibility 2020-02-16 15:14:55 +01:00
codec_tags.h
cue.c cue: tolerate NBSP as whitespace 2020-02-03 19:13:44 +01:00
cue.h
demux.c demux: don't let --sub-create-cc-track add a track for attached pictures 2020-04-13 15:56:52 +02:00
demux.h demux: add a way to block reading after seeks 2020-02-29 21:49:00 +01:00
demux_cue.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
demux_disc.c stream, demux: redo origin policy thing 2019-12-20 13:00:39 +01:00
demux_edl.c ytdl_hook, edl: add fps, samplerate codec parameters 2020-02-21 14:48:23 +01:00
demux_lavf.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
demux_libarchive.c stream_libarchive: remember archive headers from initial open 2020-04-28 22:13:03 -07:00
demux_mf.c demux_mf: use stream API to open list files 2019-12-23 11:01:29 +01:00
demux_mkv.c demux_mkv: add png intra support 2020-04-16 00:03:26 +02:00
demux_mkv_timeline.c playlist: change from linked list to an array 2019-12-28 21:32:15 +01:00
demux_null.c demux_null: mark as seekable 2018-01-06 14:42:22 -08:00
demux_playlist.c playlist: change from linked list to an array 2019-12-28 21:32:15 +01:00
demux_raw.c options: cleanup .min use for OPT_CHANNELS 2020-04-09 11:27:38 +02:00
demux_timeline.c demux_timeline: fix bad EOF reporting 2020-02-28 00:08:36 +01:00
ebml.c demux_mkv, stream: attempt to improve behavior in unseekable streams 2019-11-14 12:59:14 +01:00
ebml.h demux_mkv: rewrite packet reading to avoid 1 memcpy() 2017-11-05 18:13:34 +01:00
matroska.h
packet.c Remove remains of Libav compatibility 2020-02-16 15:14:55 +01:00
packet.h demux: add a on-disk cache 2019-09-19 20:37:05 +02:00
stheader.h video, demux: rip out unused spherical metadata code 2019-10-17 22:49:26 +02:00
timeline.c stream, demux: redo origin policy thing 2019-12-20 13:00:39 +01:00
timeline.h edl: make it possible to delay-load files with multiple tracks 2020-02-21 00:19:17 +01:00