umlaeute / v4l2loopback

v4l2-loopback device
GNU General Public License v2.0
3.61k stars 515 forks source link

Fix read_position and write_position tracking #536

Closed asahilina closed 1 year ago

asahilina commented 1 year ago

This reverts a commit that tried to make those two variables wrap to avoid overflow, but which broke the whole tracking logic since the rest of the code doesn't expect that (on top of other issues). It's not obvious how to refactor the rest of the code to use wrapping buffer indices correctly.

Instead, this switches the indices to 64-bit, which should eliminate any concerns about them ever wrapping.

(I'm actually not sure how this ever worked for anyone, it completely broke v4l2loopback for me...)

Fixes: #535