Skip to content

Commit 440f35a

Browse files
committed
demux_libarchive: normalize the stream url path
38ad1ed 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.
1 parent 4ee4444 commit 440f35a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

demux/demux_libarchive.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020

2121
#include "common/common.h"
2222
#include "common/playlist.h"
23+
#include "misc/natural_sort.h"
24+
#include "misc/path_utils.h"
2325
#include "options/m_config.h"
2426
#include "stream/stream.h"
25-
#include "misc/natural_sort.h"
2627
#include "demux.h"
2728

2829
#include "stream/stream_libarchive.h"
@@ -75,7 +76,7 @@ static int open_file(struct demuxer *demuxer, enum demux_check check)
7576
struct playlist *pl = talloc_zero(demuxer, struct playlist);
7677
demuxer->playlist = pl;
7778

78-
char *prefix = mp_url_escape(mpa, demuxer->stream->url, "~|");
79+
char *prefix = mp_normalize_path(NULL, mp_url_escape(mpa, demuxer->stream->url, "~|"));
7980

8081
char **files = NULL;
8182
int num_files = 0;
@@ -86,6 +87,7 @@ static int open_file(struct demuxer *demuxer, enum demux_check check)
8687
mpa->entry_filename);
8788
MP_TARRAY_APPEND(mpa, files, num_files, f);
8889
}
90+
talloc_free(prefix);
8991

9092
if (files)
9193
qsort(files, num_files, sizeof(files[0]), cmp_filename);

0 commit comments

Comments
 (0)