1
mirror of https://github.com/mpv-player/mpv synced 2024-11-14 22:48:35 +01:00
mpv/player
Dudemanguy 692ccca3a2 command: fix some fringe play-dir behavior
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
2023-08-11 22:28:50 +00:00
..
javascript build: remove outdated generated directory 2023-07-31 19:00:06 +00:00
lua osc: support speed-independent time-remaiing display 2023-08-11 14:30:42 +03:00
audio.c audio: add AO_INIT_MEDIA_ROLE_MUSIC 2023-07-31 14:01:44 +02:00
client.c options: read config file as stream 2023-04-29 22:34:54 +00:00
client.h scripting: remove race condition when toggling internal scripts 2020-03-26 23:59:44 +01:00
command.c command: fix some fringe play-dir behavior 2023-08-11 22:28:50 +00:00
command.h player: make deprecated track/chapter/metadata events internal 2021-12-15 12:29:10 +01:00
configfiles.c player: delete watch_later file after successful load 2023-07-08 14:33:47 +00:00
core.h Revert "audio: add AOCONTROL_UPDATE_MEDIA_ROLE" 2023-07-30 19:48:35 +02:00
external_files.c external_files: add sbv to the sub whitelist 2023-08-10 13:50:34 -05:00
external_files.h player: add automatic loading of external cover art files 2020-09-28 00:12:52 +02:00
javascript.c build: remove outdated generated directory 2023-07-31 19:00:06 +00:00
loadfile.c loadfile: make get_audio_lang function static 2023-07-17 18:02:07 +02:00
lua.c build: remove outdated generated directory 2023-07-31 19:00:06 +00:00
main.c player/main: do not print build time, if it is unknown 2023-08-02 18:51:13 +00:00
meson.build build: remove outdated generated directory 2023-07-31 19:00:06 +00:00
misc.c vo_wayland: fix warning -Wvoid-pointer-to-enum-cast 2023-02-26 16:45:07 +01:00
osd.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
playloop.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
screenshot.c screenshot: implement screenshot-window in sw for most VOs 2023-07-21 20:23:11 +02:00
screenshot.h player: make screenshot each-frame mode more accurate 2020-02-07 13:32:21 +01:00
scripting.c player/scripting: fix use-after-free when loading script folders 2021-04-08 23:47:35 +03:00
sub.c sub: fix switching tracks while paused 2023-08-11 22:28:50 +00:00
video.c player/video: check for track and decoder existence 2023-07-27 16:30:26 +02:00