summaryrefslogtreecommitdiffstats
path: root/player/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/main.c')
-rw-r--r--player/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/player/main.c b/player/main.c
index f3d591ecae..b0150b2b80 100644
--- a/player/main.c
+++ b/player/main.c
@@ -267,7 +267,7 @@ struct MPContext *mp_create(void)
.dispatch = mp_dispatch_create(mpctx),
.playback_abort = mp_cancel_new(mpctx),
.thread_pool = mp_thread_pool_create(mpctx, 0, 1, 30),
- .stop_play = PT_STOP,
+ .stop_play = PT_NEXT_ENTRY,
.play_dir = 1,
};
@@ -407,6 +407,10 @@ int mp_initialize(struct MPContext *mpctx, char **options)
if (opts->force_vo == 2 && handle_force_window(mpctx, false) < 0)
return -1;
+ // Needed to properly enter _initial_ idle mode if playlist empty.
+ if (mpctx->opts->player_idle_mode && !mpctx->playlist->num_entries)
+ mpctx->stop_play = PT_STOP;
+
MP_STATS(mpctx, "end init");
return 0;