mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 23:51:21 +02:00
Don't process reqeued MPV commands (#633)
## Description This is an embarrassing bug... In #619, a change was made to avoid a race condition and wait for the video output surface to be ready by re-enqueuing commands. Except I missed cancelling executing the current command. This meant the command would both be executed and queued again. So, if attaching the video surface takes a while, such as needing to wait for a refresh rate change, _a lot_ of commands could have been added to the queue and trigger a constant start-stop playback loop. I think technically it would eventually resolve itself, but can take a while. ### Related issues Should fix #626
This commit is contained in:
parent
02d6a98ba8
commit
4f1c730736
1 changed files with 2 additions and 1 deletions
|
|
@ -848,7 +848,8 @@ class MpvPlayer(
|
|||
// Note: this means nothing will play until it is attached to a surface,
|
||||
// so MpvPlayer can't be used for background audio/music playback
|
||||
Timber.v("MPV is not initialized/attached yet, requeue cmd %s", cmd)
|
||||
internalHandler.sendMessageDelayed(Message.obtain(msg), 50)
|
||||
internalHandler.sendMessageDelayed(Message.obtain(msg), 250)
|
||||
return true
|
||||
}
|
||||
when (cmd) {
|
||||
MpvCommand.PLAY_PAUSE -> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue