player: do not always set mpctx->stop_play when seeking at EOF #14135
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Normally if you seek during EOF, mpv will reset the value of mpctx->stop_play so it doesn't exit. There's at least a couple of exceptions where this shouldn't happen however. If the play direction changes right at the end of the file, we shouldn't touch the value to avoid an erronous assertion error. Additionally, it is apparently possible for the queue_seek call in VO reinit code to trigger the assertion issue. This is a seek of exactly zero and logically shouldn't be reset mpctx->stop_play anyways (i.e. AT_END_OF_FILE should stay the same). By moving this to queue_seek itself, most of the special handling in player/command.c can be dropped. The option still needs to be set though. Fixes #13778.
@user1121114685: Can you verify if this works for you?