mirror of
https://github.com/mpv-player/mpv
synced 2025-02-18 13:47:04 +00:00
ao_alsa: reinitialize if device got broken
Apparently, physically disconnecting the audio device (consider USB audio) breaks the ALSA device handle forever. It will signal ENODEV. Fortunately, it's easy for us to handle this, and we can just use existing mechanisms that will make the playback core close and reopen the AO. Whether the immediate reopening will actually succeeds really is ALSA's problem, though.
This commit is contained in:
parent
a0caadd512
commit
c0077ac936