mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
When the audio thread fails to properly init, it signals failure to the main thread, AND THEN starts to clean up. For this to work, ao_init callback must not return until the thread's cleanup is finished. This is correctly handled in the ao_uninit callback by waiting for the thread to exit, so just call that to clean up the main thread. I have no idea why I didn't do this in the first place.