summaryrefslogtreecommitdiffstats
path: root/player/playloop.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/playloop.c')
-rw-r--r--player/playloop.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/player/playloop.c b/player/playloop.c
index a53c2c4b96..0e35dcb88b 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -871,11 +871,19 @@ void run_playloop(struct MPContext *mpctx)
mpctx->hrseek_active = false;
mp_notify(mpctx, MPV_EVENT_PLAYBACK_RESTART, NULL);
mpctx->restart_complete = true;
- if (opts->playing_msg && !mpctx->playing_msg_shown) {
- char *msg =
- mp_property_expand_escaped_string(mpctx, opts->playing_msg);
- MP_INFO(mpctx, "%s\n", msg);
- talloc_free(msg);
+ if (!mpctx->playing_msg_shown) {
+ if (opts->playing_msg) {
+ char *msg =
+ mp_property_expand_escaped_string(mpctx, opts->playing_msg);
+ MP_INFO(mpctx, "%s\n", msg);
+ talloc_free(msg);
+ }
+ if (opts->osd_playing_msg) {
+ char *msg =
+ mp_property_expand_escaped_string(mpctx, opts->osd_playing_msg);
+ set_osd_msg(mpctx, 1, opts->osd_duration, "%s", msg);
+ talloc_free(msg);
+ }
}
mpctx->playing_msg_shown = true;
}