Skip to content

Commit 5ab19f8

Browse files
committed
command: normalize stream-open-filename
Since 38ad1ed path is normalized but stream-open-filename is not, making the docs where it says that they are the same wrong, so normalize stream-open-filename too.
1 parent 440f35a commit 5ab19f8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

player/command.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,7 @@ static int mp_property_stream_open_filename(void *ctx, struct m_property *prop,
547547
int action, void *arg)
548548
{
549549
MPContext *mpctx = ctx;
550+
char *path;
550551
if (!mpctx->stream_open_filename || !mpctx->playing)
551552
return M_PROPERTY_UNAVAILABLE;
552553
switch (action) {
@@ -560,7 +561,10 @@ static int mp_property_stream_open_filename(void *ctx, struct m_property *prop,
560561
}
561562
case M_PROPERTY_GET_TYPE:
562563
case M_PROPERTY_GET:
563-
return m_property_strdup_ro(action, arg, mpctx->stream_open_filename);
564+
path = mp_normalize_path(NULL, mpctx->stream_open_filename);
565+
int r = m_property_strdup_ro(action, arg, path);
566+
talloc_free(path);
567+
return r;
564568
}
565569
return M_PROPERTY_NOT_IMPLEMENTED;
566570
}

0 commit comments

Comments
 (0)