aboutsummaryrefslogtreecommitdiffhomepage
path: root/player
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2014-09-02 00:09:03 +0200
committerGravatar wm4 <wm4@nowhere>2014-09-02 00:12:52 +0200
commit2da246b9f715a5694263b1ed3dee30b2001b6ed4 (patch)
tree97fa275f2c0a6fd4b2d6f489262b188a8d6574ba /player
parent291d98681051713a13efaa2e381cf1e3f8efaa70 (diff)
player: add --osd-playing-msg option
Diffstat (limited to 'player')
-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;
}