From 04bde06095215f27cef0be01ce4d831ab2719591 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 4 Jan 2020 18:59:23 +0100 Subject: stream_libarchive: some more hacks to improve multi-volume archives Instead of opening every volume on start just to see if it's there, all all volumes that could possibly exist, and "handle" it on opening. This requires working around some of libarchive's amazing stupidity and using some empirically determined behavior. Will possibly break if libarchive changes some of this behavior. See: #7182 --- demux/demux_libarchive.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'demux') diff --git a/demux/demux_libarchive.c b/demux/demux_libarchive.c index b038e149d9..31e0c2b418 100644 --- a/demux/demux_libarchive.c +++ b/demux/demux_libarchive.c @@ -49,7 +49,7 @@ static int open_file(struct demuxer *demuxer, enum demux_check check) int probe_got = stream_read_peek(demuxer->stream, probe, probe_size); struct stream *probe_stream = stream_memory_open(demuxer->global, probe, probe_got); - struct mp_archive *mpa = mp_archive_new(mp_null_log, probe_stream, flags); + struct mp_archive *mpa = mp_archive_new(mp_null_log, probe_stream, flags, 0); bool ok = !!mpa; free_stream(probe_stream); mp_archive_free(mpa); @@ -57,7 +57,7 @@ static int open_file(struct demuxer *demuxer, enum demux_check check) if (!ok) return -1; - mpa = mp_archive_new(demuxer->log, demuxer->stream, flags); + mpa = mp_archive_new(demuxer->log, demuxer->stream, flags, 0); if (!mpa) return -1; -- cgit v1.2.3