Skip to content

rdp/buffer-pool: Fix race in on_stream_param_changed

Disclaimer

This is my first issue here, comments will be gladly accepted.

Description

This PR fixes #123 (closed).

We release all the buffers from the rdp_buffer_pool using release_all_buffers, but sometimes the graphics thread can manage to catch a buffer before we get the chance to resize the buffers in the buffer pool using grd_rdp_buffer_pool_resize_buffers.

This means the resize needs to be done with the frame_mutex and surface_mutex locked, so that the graphics thread can't grab a buffer.

Merge request reports