diff options
author | wm4 <wm4@nowhere> | 2014-09-09 00:38:32 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-09-09 01:23:10 +0200 |
commit | 9cb1e2c58ca21f12b65167eb8a3640bda8eadfd5 (patch) | |
tree | 7aa0769e3b0313b7ea903b6271c5f3f2e4e6cf95 /common/playlist.c | |
parent | 76f9eede349b57fdffd2f09cb45f9f58b225711b (diff) | |
download | mpv-9cb1e2c58ca21f12b65167eb8a3640bda8eadfd5.tar.bz2 mpv-9cb1e2c58ca21f12b65167eb8a3640bda8eadfd5.tar.xz |
player: normalize playlist entries on add
This is not necessarily more correct, but it's less trouble.
Diffstat (limited to 'common/playlist.c')
-rw-r--r-- | common/playlist.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/playlist.c b/common/playlist.c index d64db16e98..46ae36d643 100644 --- a/common/playlist.c +++ b/common/playlist.c @@ -30,7 +30,8 @@ struct playlist_entry *playlist_entry_new(const char *filename) { struct playlist_entry *e = talloc_zero(NULL, struct playlist_entry); - e->filename = talloc_strdup(e, filename); + char *local_filename = mp_file_url_to_filename(e, bstr0(filename)); + e->filename = local_filename ? local_filename : talloc_strdup(e, filename); return e; } |