From bf5eac8dd3f142acd0d506407f1ae853ada3c5bc Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 17 Aug 2015 23:59:44 +0200 Subject: 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). --- demux/demux_libarchive.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'demux') 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; -- cgit v1.2.3