summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-01-07 15:32:27 +0100
committerwm4 <wm4@nowhere>2020-01-07 15:32:27 +0100
commit28650e116a1435aed73a21fc5dd006e8f6fa8159 (patch)
tree5738490d1d07d469ca60728f17bfe9288bc2a3d6
parent9eb399193eda34612a016f0310cb4b2aebaabaa1 (diff)
downloadmpv-28650e116a1435aed73a21fc5dd006e8f6fa8159.tar.bz2
mpv-28650e116a1435aed73a21fc5dd006e8f6fa8159.tar.xz
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.
-rw-r--r--stream/stream_libarchive.c13
1 files 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;