Skip to content

linux-v4l2: Fix virtual camera reset failures - #12510

Merged
RytoEX merged 1 commit into
obsproject:masterfrom
stephematician:vcam_fix
May 7, 2026
Merged

RytoEX merged 1 commit into
obsproject:masterfrom
stephematician:vcam_fix

Conversation

@stephematician

Copy link
Copy Markdown
Contributor

Reverts much of PR #11906 in favour of a different way to detect whether or not the output capabilities must be reset.

The new approach will contain false positives for which the workaround is not needed but it won't have negative side effects.

Description

Removes the 'reset' capability workaround which failed in some cases; see #12506. Now the previous 'STREAMON' workaround is used provided a device for which a STREAMON succeeds when it shouldn't is found. This should be the case for any loopback device from 0.12.5 through to 0.13.2. For the 0.13.x loopback devices, the workaround is used, but unnecessary, and it has no ill side-effects in tests conducted.

Motivation and Context

See #12506

How Has This Been Tested?

Tested with loopback 0.12.5-0.12.7, and 0.13.2. Camera starts and stops, and can be viewed in other applications.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@WizardCM WizardCM added kind/bug Categorizes issue or PR as related to a bug. platform/linux Categorizes issue or PR as affecting Linux specifically labels Aug 16, 2025
@stephematician

Copy link
Copy Markdown
Contributor Author

Rebased onto master due to recent activity on https://obsproject.com/forum/threads/virtual-camera-only-works-once.193278/#post-697744

Confirm that this still provides a solution to the virtual camera reset issue #12506

@stephematician

Copy link
Copy Markdown
Contributor Author

@kkartaltepe - this should be an easy win/approve. Still, some testers would be nice.

@RytoEX RytoEX self-assigned this Jan 22, 2026
@Warchamp7 Warchamp7 added this to the OBS Studio 32.2 milestone May 6, 2026

@RytoEX RytoEX left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine. For future reference, the project prefers US English spelling for text in code and commit messages, but I won't block on this here if the commit message is the same when I circle back around to merge.

Reverts much of PR obsproject#11906 in favor of a different way to detect whether
or not the output capabilities must be reset.

The new approach will contain false positives for which the workaround
is not needed but it won't have negative side effects.
@stephematician

Copy link
Copy Markdown
Contributor Author

Corrected, thanks for the reminder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Categorizes issue or PR as related to a bug. platform/linux Categorizes issue or PR as affecting Linux specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants