Skip to content

wpesrc: fix possible small deadlock on shutdown

Problem is that unreffing the EGLImage/SHM Buffer while holding the images_mutex lock may deadlock when a new buffer is advertised and an attempt is made to lock the images_mutex there.

The advertisement of the new image/buffer is performed in the WPEContextThread and the blocking dispatch when unreffing wants to run something on the WPEContextThread however images_mutex has already been locked by the destructor.

Delay unreffing images/buffers outside of images_mutex and instead just clear the relevant fields within the lock.

Merge request reports