path: root/
diff options
authorwm4 <wm4@nowhere>2015-08-17 00:55:26 +0200
committerwm4 <wm4@nowhere>2015-08-17 00:55:26 +0200
commit2b280f4522a288429253b396b778d60ed018312c (patch)
treeec76722ed42b8323fee962fa333d5e116784c2fb /
parent00b60710cf5a290f1882472d51577f72795a3335 (diff)
stream: libarchive wrapper for reading compressed archives
This works similar to the existing .rar support, but uses libarchive. libarchive supports a number of formats, including zip and (most of) rar. Unfortunately, seeking does not work too well. Most libarchive readers do not support seeking, so it's emulated by skipping data until the target position. On backwards seek, the file is reopened. This works fine on a local machine (and if the file is not too large), but will perform not so well over network connection. This is disabled by default for now. One reason is that we try libarchive on every file we open, before trying libavformat, and I'm not sure if I trust libarchive that much yet. Another reason is that this breaks multivolume rar support. While libarchive supports seeking in rar, and (probably) supports multivolume archive, our support of libarchive (probably) does not. I don't care about multivolume rar, but vocal users do.
Diffstat (limited to '')
1 files changed, 2 insertions, 0 deletions
diff --git a/ b/
index a96fb87540..dfe7650f3a 100644
--- a/
+++ b/
@@ -170,6 +170,7 @@ def build(ctx):
( "demux/demux_disc.c" ),
( "demux/demux_edl.c" ),
( "demux/demux_lavf.c" ),
+ ( "demux/demux_libarchive.c", "libarchive" ),
( "demux/demux_libass.c", "libass"),
( "demux/demux_mf.c" ),
( "demux/demux_mkv.c" ),
@@ -247,6 +248,7 @@ def build(ctx):
( "stream/stream_edl.c" ),
( "stream/stream_file.c" ),
( "stream/stream_lavf.c" ),
+ ( "stream/stream_libarchive.c", "libarchive" ),
( "stream/stream_memory.c" ),
( "stream/stream_mf.c" ),
( "stream/stream_null.c" ),