summaryrefslogtreecommitdiffstats
path: root/player/loadfile.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-04-14 19:06:13 +0200
committerwm4 <wm4@nowhere>2017-04-14 19:06:31 +0200
commit3e8510d515e9446f7c1f2b4372e501a713bb2502 (patch)
tree1694d3d4bf27623b42394c47599f78f9428c8d81 /player/loadfile.c
parentb586bc2dbec6495e65ef1a34045f6d66a7112d9d (diff)
downloadmpv-3e8510d515e9446f7c1f2b4372e501a713bb2502.tar.bz2
mpv-3e8510d515e9446f7c1f2b4372e501a713bb2502.tar.xz
player: fix a corner case in previous commit
The previous commit set "mpctx->playback_active = false;" before unload hooks were processed. This was intentional, but could in theory cause playback_active to be set to true again, and actually it's plain wrong if playback was exited in the middle it. There needs to be something else that forces playback_active to be set to false while in this unloading state.
Diffstat (limited to 'player/loadfile.c')
-rw-r--r--player/loadfile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/player/loadfile.c b/player/loadfile.c
index 1aa4c4a49d..e0a796d9fc 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -1274,14 +1274,15 @@ reopen_file:
playback_start = mp_time_sec();
mpctx->error_playing = 0;
+ mpctx->in_playloop = true;
while (!mpctx->stop_play)
run_playloop(mpctx);
+ mpctx->in_playloop = false;
MP_VERBOSE(mpctx, "EOF code: %d \n", mpctx->stop_play);
terminate_playback:
- mpctx->playback_active = false;
update_core_idle_state(mpctx);
process_unload_hooks(mpctx);