summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-08-17 23:59:44 +0200
committerwm4 <wm4@nowhere>2015-08-17 23:59:55 +0200
commitbf5eac8dd3f142acd0d506407f1ae853ada3c5bc (patch)
treea19ee90daa0d1ca469455bd8dba9d6d6a336e020 /demux
parent41d7989800aef7b52affdddf0a5f539fb2a1d562 (diff)
downloadmpv-bf5eac8dd3f142acd0d506407f1ae853ada3c5bc.tar.bz2
mpv-bf5eac8dd3f142acd0d506407f1ae853ada3c5bc.tar.xz
demux_libarchive: open flat compressed files
Things like .gz etc., which have no real file header. A mixed bag, because it e.g. tends to misdetect mp3 files as compressed files or something (of course it has no mp3 support - I don't know as what it detects them). But requested by someone (or maybe not, I'm not sure how to interpret that).
Diffstat (limited to 'demux')
-rw-r--r--demux/demux_libarchive.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/demux/demux_libarchive.c b/demux/demux_libarchive.c
index b95f37228c..ae2bd95599 100644
--- a/demux/demux_libarchive.c
+++ b/demux/demux_libarchive.c
@@ -32,7 +32,10 @@ static int cmp_filename(const void *a, const void *b)
static int open_file(struct demuxer *demuxer, enum demux_check check)
{
- struct mp_archive *mpa = mp_archive_new(demuxer->log, demuxer->stream);
+ int flags = 0;
+ if (check <= DEMUX_CHECK_REQUEST)
+ flags |= MP_ARCHIVE_FLAG_UNSAFE;
+ struct mp_archive *mpa = mp_archive_new(demuxer->log, demuxer->stream, flags);
if (!mpa)
return -1;