summaryrefslogtreecommitdiffstats
path: root/player/misc.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-07-08 21:31:31 +0200
committerwm4 <wm4@nowhere>2015-07-08 21:31:31 +0200
commit15581f2209898bdd1747d4a32f57a00ba5098fdd (patch)
tree6462bf49695bb931d726a0937ad4c974d2006e05 /player/misc.c
parent0be07e1d86c4817a3889196de1ae59ae7130fc35 (diff)
downloadmpv-15581f2209898bdd1747d4a32f57a00ba5098fdd.tar.bz2
mpv-15581f2209898bdd1747d4a32f57a00ba5098fdd.tar.xz
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.
Diffstat (limited to 'player/misc.c')
-rw-r--r--player/misc.c3
1 files changed, 2 insertions, 1 deletions
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;
}