Repository navigation
linux-v4l2: Continue virtual camera frames after short writes (Refs #1464) - #1558
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1464 (split from it: one small PR per fix)
What and why
virtual_video()resent the frame from its first byte with the full length after a short write, so the v4l2loopback device got the start of the frame where the rest belonged (and the remaining count could run past zero). It now advances the pointer and length, retries EINTR, and stops on other errors or a zero-byte write.RED → GREEN
a0d799786addstest/cmocka/test_v4l2_vcam_write.c: the realv4l2-output.cwithwrite()wrapped to take at most 300 bytes per call (or fail once with EINTR). On mastershort_writes_continue_the_frame(device got the frame's first bytes again) andinterrupted_write_is_retriedfail;whole_frame_in_one_writepasses (guard).Checklist
masterdocs/features.mdis added (wording from fix: 20 bug fixes in libobs callbacks, muxer, audio and build #1464)./lintpasses