mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
player: allow unsetting --term/osd-playing-msg
Treat an empty string as unset. The fact that the option values can be NULL is merely weirdness due to how the option parser works (it unfortunately doesn't initialize string fields to non-NULL).
This commit is contained in:
@@ -915,13 +915,13 @@ static void handle_playback_restart(struct MPContext *mpctx, double endpts)
|
||||
mpctx->restart_complete = true;
|
||||
mp_notify(mpctx, MPV_EVENT_PLAYBACK_RESTART, NULL);
|
||||
if (!mpctx->playing_msg_shown) {
|
||||
if (opts->playing_msg) {
|
||||
if (opts->playing_msg && opts->playing_msg[0]) {
|
||||
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) {
|
||||
if (opts->osd_playing_msg && opts->osd_playing_msg[0]) {
|
||||
char *msg =
|
||||
mp_property_expand_escaped_string(mpctx, opts->osd_playing_msg);
|
||||
set_osd_msg(mpctx, 1, opts->osd_duration, "%s", msg);
|
||||
|
||||
Reference in New Issue
Block a user