From 28650e116a1435aed73a21fc5dd006e8f6fa8159 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 7 Jan 2020 15:32:27 +0100 Subject: stream_libarchive: enable anger management Well that was too much misery when trying to deal with an idiotic feature, so it had to be compensated for. Replace insults with proper explanation, libarchive sort of isn't guilty in the first place, and their format support is pretty good all things considered. --- stream/stream_libarchive.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/stream/stream_libarchive.c b/stream/stream_libarchive.c index 857650059b..9d09e1991b 100644 --- a/stream/stream_libarchive.c +++ b/stream/stream_libarchive.c @@ -111,11 +111,12 @@ static int open_cb(struct archive *arch, void *priv) vol->mpa->primary_src->global); // We pretend that failure to open a stream means it was not found, // we assume in turn means that the volume doesn't exist (since - // libarchive is too fucking stupid to detect when a multi-volume - // archive really ends). libarchive also throws up permanently when - // a volume could not be opened (because it's fucking stupid), but - // somehow accepts 0-sized volumes (because it's fucking stupid), which - // we simulate whenever vol->src==NULL for an opened volume. + // libarchive builds volumes as some sort of abstraction on top of its + // stream layer, and its rar code cannot access volumes or signal + // anything related to this). libarchive also encounters a fatal error + // when a volume could not be opened. However, due to the way volume + // support works, it is fine with 0-sized volumes, which we simulate + // whenever vol->src==NULL for an opened volume. if (!vol->src) { vol->mpa->num_volumes = MPMIN(vol->mpa->num_volumes, vol->index); MP_INFO(vol->mpa, "Assuming the volume above was not needed.\n"); @@ -298,7 +299,7 @@ struct mp_archive *mp_archive_new(struct mp_log *log, struct stream *src, "not very good due to lack of good libarchive support for them. " "They are also an excessively inefficient and stupid way to " "distribute media files, so tell the people creating these files " - "to fuck off.\n"); + "to rethink this.\n"); } return mpa; -- cgit v1.2.3