mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-18 14:04:20 +01:00
The v4l2_sink implementation directly read the internal video_buffer field "pending_frame_consumed", which is protected by the internal video_buffer mutex. But this mutex was not locked, so reads were racy. Lock using the v4l2_sink mutex in addition, and use a separate field to avoid depending on the video_buffer internal data.