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/misc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'player/misc.c') diff --git a/player/misc.c b/player/misc.c index 613b475365..3d54d36ff7 100644 --- a/player/misc.c +++ b/player/misc.c @@ -192,7 +192,8 @@ void error_on_track(struct MPContext *mpctx, struct track *track) (!mpctx->current_track[0][STREAM_AUDIO] && !mpctx->current_track[0][STREAM_VIDEO])) { - mpctx->stop_play = PT_ERROR; + if (!mpctx->stop_play) + mpctx->stop_play = PT_ERROR; if (mpctx->error_playing >= 0) mpctx->error_playing = MPV_ERROR_NOTHING_TO_PLAY; } -- cgit v1.2.3