From 440f35a26db3fd9f25282bff0f06f4e86e8133c2 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Tue, 15 Jul 2025 11:58:28 -0500 Subject: [PATCH] demux_libarchive: normalize the stream url path 38ad1ed03b2a3ff8ae8ebed56d2d24239e5ca15e was supposed to normalize all path names, but the path from the libarchive demuxer works differently. We need to normalize it within the demuxer itself so you get something like "archive://" in the property. Fixes #16247. --- demux/demux_libarchive.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/demux/demux_libarchive.c b/demux/demux_libarchive.c index f08bfba0f4..db9257d6cd 100644 --- a/demux/demux_libarchive.c +++ b/demux/demux_libarchive.c @@ -20,9 +20,10 @@ #include "common/common.h" #include "common/playlist.h" +#include "misc/natural_sort.h" +#include "misc/path_utils.h" #include "options/m_config.h" #include "stream/stream.h" -#include "misc/natural_sort.h" #include "demux.h" #include "stream/stream_libarchive.h" @@ -75,7 +76,7 @@ static int open_file(struct demuxer *demuxer, enum demux_check check) struct playlist *pl = talloc_zero(demuxer, struct playlist); demuxer->playlist = pl; - char *prefix = mp_url_escape(mpa, demuxer->stream->url, "~|"); + char *prefix = mp_normalize_path(NULL, mp_url_escape(mpa, demuxer->stream->url, "~|")); char **files = NULL; int num_files = 0; @@ -86,6 +87,7 @@ static int open_file(struct demuxer *demuxer, enum demux_check check) mpa->entry_filename); MP_TARRAY_APPEND(mpa, files, num_files, f); } + talloc_free(prefix); if (files) qsort(files, num_files, sizeof(files[0]), cmp_filename);