From 15581f2209898bdd1747d4a32f57a00ba5098fdd Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 8 Jul 2015 21:31:31 +0200 Subject: player: never overwrite stop_play field This is a real pain: if a quit command is received, it's set to PT_QUIT. And then other code could overwrite it, making it not quit. The annoying bit is that stop_play is written and read in many places. Just not overwriting it unconditionally seems to be the best course of action. --- player/video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player/video.c') diff --git a/player/video.c b/player/video.c index 87e6a8fb60..ccdac3b042 100644 --- a/player/video.c +++ b/player/video.c @@ -926,7 +926,7 @@ void write_video(struct MPContext *mpctx, double endpts) if (!mpctx->step_frames && !opts->pause) pause_player(mpctx); } - if (mpctx->max_frames == 0) + if (mpctx->max_frames == 0 && !mpctx->stop_play) mpctx->stop_play = AT_END_OF_FILE; if (mpctx->max_frames > 0) mpctx->max_frames--; -- cgit v1.2.3