demux_libarchive: normalize the stream url path

38ad1ed03b 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://<absolute path to archive>" in the property.

Fixes #16247.
This commit is contained in:
Dudemanguy committed 2025-07-16 13:42:38 +00:00
1 parent 4ee4444b68
commit 440f35a26d
1 file changed
+4 -2
+4 -2
View File
@@ -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);