| @@ -507,7 +507,10 @@ static int mp_property_path(void *ctx, struct m_property *prop, · 506 unmodified lines |
| 507 | 507 | MPContext *mpctx = ctx; |
| 508 | 508 | if (!mpctx->filename) |
| 509 | 509 | return M_PROPERTY_UNAVAILABLE; |
| 510 | | − return m_property_strdup_ro(action, arg, mpctx->filename); |
| 510 | + char *path = mp_normalize_path(NULL, mpctx->filename); |
| 511 | + int r = m_property_strdup_ro(action, arg, path); |
| 512 | + talloc_free(path); |
| 513 | + return r; |
| 511 | 514 | } |
| 512 | 515 | |
| 513 | 516 | static int mp_property_filename(void *ctx, struct m_property *prop, |
| @@ -1997,6 +2000,9 @@ static int get_track_entry(int item, int action, void *arg, void *ctx) · 1483 unmodified lines |
| 1997 | 2000 | struct MPContext *mpctx = ctx; |
| 1998 | 2001 | struct track *track = mpctx->tracks[item]; |
| 1999 | 2002 | |
| 2003 | + char *external_filename = mp_normalize_user_path(NULL, mpctx->global, |
| 2004 | + track->external_filename); |
| 2005 | + |
| 2000 | 2006 | struct mp_codec_params p = |
| 2001 | 2007 | track->stream ? *track->stream->codec : (struct mp_codec_params){0}; |
| 2002 | 2008 | |
| @@ -2048,8 +2054,8 @@ static int get_track_entry(int item, int action, void *arg, void *ctx) · 45 unmodified lines |
| 2048 | 2054 | {"external", SUB_PROP_BOOL(track->is_external)}, |
| 2049 | 2055 | {"selected", SUB_PROP_BOOL(track->selected)}, |
| 2050 | 2056 | {"main-selection", SUB_PROP_INT(order), .unavailable = order < 0}, |
| 2051 | | − {"external-filename", SUB_PROP_STR(track->external_filename), |
| 2052 | | − .unavailable = !track->external_filename}, |
| 2057 | + {"external-filename", SUB_PROP_STR(external_filename), |
| 2058 | + .unavailable = !external_filename}, |
| 2053 | 2059 | {"ff-index", SUB_PROP_INT(track->ff_index)}, |
| 2054 | 2060 | {"hls-bitrate", SUB_PROP_INT(track->hls_bitrate), |
| 2055 | 2061 | .unavailable = !track->hls_bitrate}, |
| @@ -2123,6 +2129,7 @@ static int get_track_entry(int item, int action, void *arg, void *ctx) · 67 unmodified lines |
| 2123 | 2129 | } |
| 2124 | 2130 | |
| 2125 | 2131 | done: |
| 2132 | + talloc_free(external_filename); |
| 2126 | 2133 | talloc_free(tag_list); |
| 2127 | 2134 | return ret; |
| 2128 | 2135 | } |