Skip to content

Commit 6635cbb

Browse files
committed
common/playlist: store normalized playlist filenames
This normalizes the playlist/N/filename sub-property, making it consistent with path. As a consequence playlist-path and stream-path are also normalized. This will allow simplifying the code by not normalizing playlist filenames in several places, similar to 23b57e9 for tracks.
1 parent 9afdae5 commit 6635cbb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

common/playlist.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ struct playlist_entry *playlist_entry_new(const char *filename)
3131
{
3232
struct playlist_entry *e = talloc_zero(NULL, struct playlist_entry);
3333
char *local_filename = mp_file_url_to_filename(e, bstr0(filename));
34-
e->filename = local_filename ? local_filename : talloc_strdup(e, filename);
34+
e->filename = mp_normalize_path(e, local_filename ? local_filename : filename);
35+
talloc_free(local_filename);
3536
e->stream_flags = STREAM_ORIGIN_DIRECT;
3637
e->original_index = -1;
3738
return e;

0 commit comments

Comments
 (0)