mpv/stream
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
..
cookies.c cookies: change license to LGPL 2017-05-11 07:29:01 +02:00
cookies.h cookies: change license to LGPL 2017-05-11 07:29:01 +02:00
dvb_tune.c dvb: Add multiple frontends support: MAX_FRONTENDS now 8. 2017-12-16 23:24:55 -08:00
dvb_tune.h dvb: Add multiple frontends support: MAX_FRONTENDS now 8. 2017-12-16 23:24:55 -08:00
dvbin.h stream_dvb: Remove now replaced stream-control code for good. 2019-10-02 01:25:45 +02:00
stream.c stream: actually drop unneeded buffer 2020-04-10 12:37:12 +02:00
stream.h stream: fix whitespace within comment 2020-04-10 10:50:54 +02:00
stream_avdevice.c stream, demux: redo origin policy thing 2019-12-20 13:00:39 +01:00
stream_bluray.c stream, demux: redo origin policy thing 2019-12-20 13:00:39 +01:00
stream_cb.c stream, demux: redo origin policy thing 2019-12-20 13:00:39 +01:00
stream_cdda.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
stream_concat.c stream_concat, stream_memory: more stream_origin stuff 2019-12-23 11:03:44 +01:00
stream_dvb.c stream_dvb: Remove call to stream_drop_buffers in fill_buffer. 2020-04-10 17:12:53 +02:00
stream_dvdnav.c stream, demux: redo origin policy thing 2019-12-20 13:00:39 +01:00
stream_edl.c demux, stream: rip out the classic stream cache 2018-08-31 12:55:22 +02:00
stream_file.c stream_file: mark fd protocols as "unsafe" 2020-03-08 19:38:10 +01:00
stream_lavf.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
stream_libarchive.c stream_libarchive: remember archive headers from initial open 2020-04-28 22:13:03 -07:00
stream_libarchive.h stream_libarchive: remember archive headers from initial open 2020-04-28 22:13:03 -07:00
stream_memory.c stream_concat, stream_memory: more stream_origin stuff 2019-12-23 11:03:44 +01:00
stream_mf.c demux, stream: rip out the classic stream cache 2018-08-31 12:55:22 +02:00
stream_null.c stream_null: change license to LGPL 2017-05-08 12:45:50 +02:00