[vlc-devel] [PATCH 1/3] coreaudio: fix possible deadlock on pause

Rémi Denis-Courmont remi at remlab.net
Sat Dec 9 22:08:13 CET 2017


Le lauantaina 9. joulukuuta 2017, 14.57.31 EET Carola Nitz a écrit :
> The issue we had is that the iOS system takes away the audio session when
> you start a different music app.

So what? Windows and Linux have audio policies that can take the device away 
from VLC too. And any system can have Bluetooth or USB devices disconnected. 

You can always request a restart, and ignore any audio callback until stop. 
Then start gets called again and you can proceed normally.

> So we just get an interruption event on a
> random thread notifying us that the system just closed the output for us.
> I guess that’s the missing information here :)

That does not sound any different than what happens on other systems.

Note however that if the memory representation of the audio session is 
destroyed in a truly asynchronous fashion, then you are fully and absolutely 
hosed. You cannot avoid deadlocks and/or use-after-free, until the OS HAL is 
fixed. (VDPAU preemption exhibits that design bug.)

-- 
雷米‧德尼-库尔蒙
https://www.remlab.net/



More information about the vlc-devel mailing list