diff options
author | wm4 <wm4@nowhere> | 2015-07-08 21:31:31 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-07-08 21:31:31 +0200 |
commit | 15581f2209898bdd1747d4a32f57a00ba5098fdd (patch) | |
tree | 6462bf49695bb931d726a0937ad4c974d2006e05 /player/playloop.c | |
parent | 0be07e1d86c4817a3889196de1ae59ae7130fc35 (diff) | |
download | mpv-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/playloop.c')
-rw-r--r-- | player/playloop.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/player/playloop.c b/player/playloop.c index 65bdf54252..9cf19630b2 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -798,7 +798,7 @@ static void handle_sstep(struct MPContext *mpctx) } if (mpctx->video_status >= STATUS_EOF) { - if (mpctx->max_frames >= 0) + if (mpctx->max_frames >= 0 && !mpctx->stop_play) mpctx->stop_play = AT_END_OF_FILE; // force EOF even if audio left if (mpctx->step_frames > 0 && !mpctx->paused) pause_player(mpctx); @@ -991,7 +991,8 @@ static void handle_segment_switch(struct MPContext *mpctx, bool end_is_new_segme .amount = mpctx->timeline[new_part].start }, true); } else { - mpctx->stop_play = AT_END_OF_FILE; + if (!mpctx->stop_play) + mpctx->stop_play = AT_END_OF_FILE; } } } |