mirror of
https://github.com/mpv-player/mpv
synced 2024-11-14 22:48:35 +01:00
692ccca3a2
This is pretty obscure but if you screw around with the play-dir option to essentially create a ping-pong loop; mpv will get hit by an assertion error. What's happening here is that changing the play-dir always requires a seek. This is handled in player/command along with the other runtime option changes. However, queue_seek can actually clear the value of mpctx->stop_play if the file is ending. So while loadfile is terminating playback and the play-dir gets changed, the value of mpctx->stop_play gets cleared because of seek. This then hits that assertion later when mpv tries to finish the file. The fix is to just add some weird logic to play-dir in player/command. We have to be sure that mpctx->play_dir matches the new direction immediately when we get the change so explictly set it here and don't wait for it later. Secondly, keep the old value of mpctx->stop_play before the seek and restore it afterwards. This ensures that termination still happens cleanly and allows the ping-pong loop to work. Fixes #10782 |
||
---|---|---|
.. | ||
javascript | ||
lua | ||
audio.c | ||
client.c | ||
client.h | ||
command.c | ||
command.h | ||
configfiles.c | ||
core.h | ||
external_files.c | ||
external_files.h | ||
javascript.c | ||
loadfile.c | ||
lua.c | ||
main.c | ||
meson.build | ||
misc.c | ||
osd.c | ||
playloop.c | ||
screenshot.c | ||
screenshot.h | ||
scripting.c | ||
sub.c | ||
video.c |