player: normalize playlist entries on add

This is not necessarily more correct, but it's less trouble.
This commit is contained in:
wm4 2014-09-09 00:38:32 +02:00
parent 76f9eede34
commit 9cb1e2c58c
2 changed files with 2 additions and 5 deletions

View File

@ -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;
}

View File

@ -1030,10 +1030,6 @@ static void play_current_file(struct MPContext *mpctx)
if (!mpctx->filename)
goto terminate_playback;
char *local_filename = mp_file_url_to_filename(tmp, bstr0(mpctx->filename));
if (local_filename)
mpctx->filename = local_filename;
mpctx->add_osd_seek_info &= OSD_SEEK_INFO_EDITION;
if (opts->reset_options) {