summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--player/command.c2
-rw-r--r--player/core.h1
-rw-r--r--player/loadfile.c2
-rw-r--r--player/osd.c6
4 files changed, 10 insertions, 1 deletions
diff --git a/player/command.c b/player/command.c
index 3513d99afc..4bbb46860d 100644
--- a/player/command.c
+++ b/player/command.c
@@ -4060,6 +4060,8 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd)
mpctx->playlist->current = e;
mpctx->playlist->current_was_replaced = false;
mpctx->stop_play = PT_CURRENT_ENTRY;
+ if (on_osd & MP_ON_OSD_MSG)
+ mpctx->add_osd_seek_info |= OSD_SEEK_INFO_CURRENT_FILE;
break;
}
diff --git a/player/core.h b/player/core.h
index ae0a5c5dbb..32239f28e3 100644
--- a/player/core.h
+++ b/player/core.h
@@ -52,6 +52,7 @@ enum mp_osd_seek_info {
OSD_SEEK_INFO_TEXT = 2,
OSD_SEEK_INFO_CHAPTER_TEXT = 4,
OSD_SEEK_INFO_EDITION = 8,
+ OSD_SEEK_INFO_CURRENT_FILE = 16,
};
diff --git a/player/loadfile.c b/player/loadfile.c
index 476461c969..2cdcc599c1 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -917,7 +917,7 @@ static void play_current_file(struct MPContext *mpctx)
mpctx->filename = talloc_strdup(tmp, mpctx->playing->filename);
mpctx->stream_open_filename = mpctx->filename;
- mpctx->add_osd_seek_info &= OSD_SEEK_INFO_EDITION;
+ mpctx->add_osd_seek_info &= OSD_SEEK_INFO_EDITION | OSD_SEEK_INFO_CURRENT_FILE;
if (opts->reset_options) {
for (int n = 0; opts->reset_options[n]; n++) {
diff --git a/player/osd.c b/player/osd.c
index e59920dd03..7e099e2d0c 100644
--- a/player/osd.c
+++ b/player/osd.c
@@ -452,6 +452,12 @@ static void add_seek_osd_messages(struct MPContext *mpctx)
mpctx->master_demuxer->edition + 1,
mpctx->master_demuxer->num_editions);
}
+ if (mpctx->add_osd_seek_info & OSD_SEEK_INFO_CURRENT_FILE) {
+ if (mpctx->filename) {
+ set_osd_msg(mpctx, 1, mpctx->opts->osd_duration, "%s",
+ mpctx->filename);
+ }
+ }
mpctx->add_osd_seek_info = 0;
}