mirror of https://github.com/mpv-player/mpv
core: rename --paused to --pause, and improve how pausing is done
Callign add_step_frame is not necessary, because mplayer always decodes at least one frame when starting a new file. Calling pause_player is sufficient, and unlike add_step_frame doesn't play any audio.
This commit is contained in:
parent
4b553cd676
commit
5fcd29eb40
|
@ -486,7 +486,7 @@ const m_option_t common_opts[] = {
|
||||||
OPT_TIME("ss", seek_to_sec, 0),
|
OPT_TIME("ss", seek_to_sec, 0),
|
||||||
|
|
||||||
// start paused
|
// start paused
|
||||||
OPT_FLAG_ON("paused", start_paused, 0),
|
OPT_FLAG_ON("pause", start_paused, 0),
|
||||||
|
|
||||||
// stop at given position
|
// stop at given position
|
||||||
{"endpos", &end_at, CONF_TYPE_TIME_SIZE, 0, 0, 0, NULL},
|
{"endpos", &end_at, CONF_TYPE_TIME_SIZE, 0, 0, 0, NULL},
|
||||||
|
|
|
@ -5003,7 +5003,7 @@ goto_enable_cache:
|
||||||
mpctx->paused ? VOCTRL_PAUSE : VOCTRL_RESUME, NULL);
|
mpctx->paused ? VOCTRL_PAUSE : VOCTRL_RESUME, NULL);
|
||||||
|
|
||||||
if (mpctx->opts.start_paused)
|
if (mpctx->opts.start_paused)
|
||||||
add_step_frame(mpctx);
|
pause_player(mpctx);
|
||||||
|
|
||||||
while (!mpctx->stop_play)
|
while (!mpctx->stop_play)
|
||||||
run_playloop(mpctx);
|
run_playloop(mpctx);
|
||||||
|
|
Loading…
Reference in New Issue