mirror of
https://github.com/mpv-player/mpv
synced 2025-01-13 18:45:25 +00:00
mplayer: unbreak OSD with CONFIG_ENCODING undefined
Basically, the encoding code path wanted to set osdlevel=0 as default, while normal playback needs osdlevel=1. For this purpose, osdlevel was set to -1 (i.e. invalid) initially to detect whether the --osdlevel option was explicitly set. When encoding was not configured (CONFIG_ENCODING undefined), the osdlevel value was not set from -1 to 1 properly, and the OSD remained invisible by default. Fix this by getting rid of this logic. It shouldn't be needed, since osdlevel=1 never shows any OSD messages without user interaction. Should this ever change, we could still check whether encoding is in progress, or add another option to allow OSD rendering during encoding.
This commit is contained in:
parent
f5f0c66d1f
commit
65adad50ab
@ -22,7 +22,7 @@ void set_default_mplayer_options(struct MPOpts *opts)
|
||||
.vo_gamma_contrast = 1000,
|
||||
.vo_gamma_saturation = 1000,
|
||||
.vo_gamma_hue = 1000,
|
||||
.osd_level = -1,
|
||||
.osd_level = 1,
|
||||
.osd_duration = 1000,
|
||||
.loop_times = -1,
|
||||
.ordered_chapters = 1,
|
||||
|
11
mplayer.c
11
mplayer.c
@ -4391,22 +4391,11 @@ int main(int argc, char *argv[])
|
||||
mp_msg(MSGT_VO, MSGL_INFO, "Encoding initialization failed.");
|
||||
exit_player(mpctx, EXIT_ERROR, 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (opts->encode_output.file) {
|
||||
m_config_set_option0(mpctx->mconfig, "vo", "lavc");
|
||||
m_config_set_option0(mpctx->mconfig, "ao", "lavc");
|
||||
m_config_set_option0(mpctx->mconfig, "fixed-vo", "yes");
|
||||
m_config_set_option0(mpctx->mconfig, "gapless-audio", "yes");
|
||||
m_config_set_option0(mpctx->mconfig, "untimed", "yes");
|
||||
|
||||
// default osd level 0
|
||||
if (opts->osd_level < 0)
|
||||
m_config_set_option0(mpctx->mconfig, "osdlevel", "0");
|
||||
} else {
|
||||
// default osd level 1
|
||||
if (opts->osd_level < 0)
|
||||
m_config_set_option0(mpctx->mconfig, "osdlevel", "1");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user