summaryrefslogtreecommitdiffstats
path: root/stream/stream_libarchive.h
diff options
context:
space:
mode:
authorKevin Mitchell <kevmitch@gmail.com>2015-11-09 04:51:29 -0800
committerKevin Mitchell <kevmitch@gmail.com>2015-11-09 22:41:19 -0800
commit4efadb280892afb7c051292e3090737420546099 (patch)
tree72e52d0bea2fe7b06135ddb3dbab4e98bfea19a4 /stream/stream_libarchive.h
parentcf5b117553307fadad380d6b44dab0599683a077 (diff)
downloadmpv-4efadb280892afb7c051292e3090737420546099.tar.bz2
mpv-4efadb280892afb7c051292e3090737420546099.tar.xz
stream_libarchive: add multivolume support
This commit introduces logic to read other volumes from the same source as the primary archive. Both .rar formats as well as 7z are supported for now. It also changes the libarchive callback structure to be per-volume consistent with the libarchive intenal client data array constructed with archive_read_append_callback_data. Added open, close and switch callbacks. Only the latter is strictly required to make sure that the streams always start at position 0, but leaving all volumes open can eat a lot of memory for archives with many parts.
Diffstat (limited to 'stream/stream_libarchive.h')
-rw-r--r--stream/stream_libarchive.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/stream/stream_libarchive.h b/stream/stream_libarchive.h
index f69faade72..ebded5b5ba 100644
--- a/stream/stream_libarchive.h
+++ b/stream/stream_libarchive.h
@@ -2,7 +2,7 @@ struct mp_log;
struct mp_archive {
struct archive *arch;
- struct stream *src;
+ struct stream *primary_src;
char buffer[4096];
};