mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-05-31 02:58:28 +01:00
mpv_terminate_destroy() blocks until mpv's threads (including the vo_avfoundation output thread) are joined, and that teardown needs the main run loop to complete. Calling it via queue.sync from MpvPlayerView deinit (main thread) deadlocked/froze the UI on playback exit. Remove the wakeup callback synchronously while self is still alive, then run mpv_terminate_destroy on the serial queue via async so deinit returns immediately and the main thread is never blocked. Also release the PiP timebase/controller in deinit.