mirror of https://github.com/mpv-player/mpv
player: remove dysfunctional edition switching OSD code
Was intended to show a "nice" message on edition switching. In practice, the message was never visible. The OSD code checks whether a demuxer is loaded, and if not, discards the message - meaning if the OSD code happened to run before the demuxer was fully loaded, no message was shown. This is apparently a regression due to extensions to the OSD and the situations in which it can be used. Remove the broken code since it's too annoying to fix. Instead, a default property message will be shown, which is a bit uglier, but actually not too unuseful.
This commit is contained in:
parent
f34faca910
commit
2ff0745ddb
|
@ -4199,7 +4199,6 @@ static const struct property_osd_display {
|
|||
{ "loop", "Loop" },
|
||||
{ "chapter", .seek_msg = OSD_SEEK_INFO_CHAPTER_TEXT,
|
||||
.seek_bar = OSD_SEEK_INFO_BAR },
|
||||
{ "edition", .seek_msg = OSD_SEEK_INFO_EDITION },
|
||||
{ "hr-seek", "hr-seek" },
|
||||
{ "speed", "Speed" },
|
||||
{ "clock", "Clock" },
|
||||
|
|
|
@ -52,8 +52,7 @@ enum mp_osd_seek_info {
|
|||
OSD_SEEK_INFO_BAR = 1,
|
||||
OSD_SEEK_INFO_TEXT = 2,
|
||||
OSD_SEEK_INFO_CHAPTER_TEXT = 4,
|
||||
OSD_SEEK_INFO_EDITION = 8,
|
||||
OSD_SEEK_INFO_CURRENT_FILE = 16,
|
||||
OSD_SEEK_INFO_CURRENT_FILE = 8,
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -977,7 +977,7 @@ static void play_current_file(struct MPContext *mpctx)
|
|||
mpctx->filename = talloc_strdup(NULL, mpctx->playing->filename);
|
||||
mpctx->stream_open_filename = mpctx->filename;
|
||||
|
||||
mpctx->add_osd_seek_info &= OSD_SEEK_INFO_EDITION | OSD_SEEK_INFO_CURRENT_FILE;
|
||||
mpctx->add_osd_seek_info &= OSD_SEEK_INFO_CURRENT_FILE;
|
||||
|
||||
if (opts->reset_options) {
|
||||
for (int n = 0; opts->reset_options[n]; n++) {
|
||||
|
|
|
@ -474,12 +474,6 @@ static void add_seek_osd_messages(struct MPContext *mpctx)
|
|||
"Chapter: %s", chapter);
|
||||
talloc_free(chapter);
|
||||
}
|
||||
if ((mpctx->add_osd_seek_info & OSD_SEEK_INFO_EDITION) && mpctx->demuxer) {
|
||||
set_osd_msg(mpctx, 1, mpctx->opts->osd_duration,
|
||||
"Playing edition %d of %d.",
|
||||
mpctx->demuxer->edition + 1,
|
||||
mpctx->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",
|
||||
|
|
Loading…
Reference in New Issue