From 13624b5c7a54c743215cfb050519ff3907418cc6 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 2 Feb 2020 17:05:14 +0100 Subject: stream_libarchive: disable tar support Unfortunately, libarchive detects a stream of 0s as tar, as demonstrated by "mpv /dev/zero". This is inconvenient in some cases. One example is the .cue demuxer trying to open a raw audio .bin file, which it allows only if probing fails (as .bin is raw and normally will not look like any real file format). Although this use-case is worthless. --- stream/stream_libarchive.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/stream/stream_libarchive.c b/stream/stream_libarchive.c index c5c0ecddc9..d5d8dca3ff 100644 --- a/stream/stream_libarchive.c +++ b/stream/stream_libarchive.c @@ -334,11 +334,6 @@ struct mp_archive *mp_archive_new(struct mp_log *log, struct stream *src, archive_read_support_filter_xz(mpa->arch); archive_read_support_format_zip_streamable(mpa->arch); - if (probe_all) { - archive_read_support_format_gnutar(mpa->arch); - archive_read_support_format_tar(mpa->arch); - } - // This zip reader is normally preferable. However, it seeks to the end // of the file, which may be annoying (HTTP reconnect, volume skipping), // so use it only as last resort, or if it's relatively likely that it's -- cgit v1.2.3