1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-18 21:06:00 +00:00

mplayer: don't clear OSD when new file is played

When switching editions, it would be nice to display an OSD message to
notify the user which edition is being played. This would be consistent
with visual feedback like on tracking switching, seeking, and so on.

Rather than introducing awkward hacks and special cases to determine
whether a file is being "restarted" (as it happens on edition switching)
to avoid clearing the OSD messages, simply never clear the OSD stack.

This is more consistent with handling of OSD bars too: they didn't
disappear when going to a new file (especially noticable when seeking
past the end of the file).
This commit is contained in:
wm4 2012-08-26 01:45:56 +02:00
parent 88728c6fad
commit 5984d702c6

View File

@ -1339,22 +1339,6 @@ void rm_osd_msg(struct MPContext *mpctx, int id)
talloc_free(msg);
}
/**
* \brief Remove all messages from the OSD stack
*
*/
static void clear_osd_msgs(struct MPContext *mpctx)
{
mp_osd_msg_t *msg = mpctx->osd_msg_stack, *prev = NULL;
while (msg) {
prev = msg->prev;
talloc_free(msg);
msg = prev;
}
mpctx->osd_msg_stack = NULL;
}
/**
* \brief Get the current message from the OSD stack.
*
@ -3877,9 +3861,6 @@ goto_enable_cache:
if (verbose)
opts->term_osd = 0;
// Make sure old OSD does not stay around
clear_osd_msgs(mpctx);
//================ SETUP STREAMS ==========================
if (mpctx->sh_video) {