Skip to content

linux-v4l2: Fixed video restarting when not needed - #14173

Open
xurei wants to merge 1 commit into
obsproject:masterfrom
xurei:pr/fix-v4l2
Open

xurei wants to merge 1 commit into
obsproject:masterfrom
xurei:pr/fix-v4l2

Conversation

@xurei

@xurei xurei commented Nov 8, 2026 •

Copy link
Copy Markdown

Description

Fix for the issue #13896 that I had myself as well. The problem was actually occuring on all the Webcam I tested (Logitech StreamCam, Logitech C920, multiple HDMI acquisition cards)

It was caused by a buffer overflow from int64 to int. This is a one-line fix.

Motivation and Context

Motivation: it was very annoying 😆.

Due to a misconfigured framerate being encoded, any change to the options would force a restart of the video capture, which was most of the time completely unnecessary, and broke focus or mouse drags on the UI sliders.

How Has This Been Tested?

I tested it on Ubuntu 26.04 with OBS 33.0.1 as the base version, with a C920 for the video capture source.
This unique change fixed 90% of the problems. I noticed that when the Auto White balance or Auto Focus are checked, the associated sliders still misbehave, but I prefer to split these problems in two, as this fix is probably a no-brainer.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Performance enhancement (non-breaking change which improves efficiency)

Checklist:

  • I have read the contributing document.

  • My code has been run through clang-format.

  • My code follows the project's style guidelines

  • My code is not on the master branch.

  • My code has been tested.

  • All commit messages are properly formatted and commits squashed where appropriate.

  • I have included updates to all appropriate documentation.

  • I did it all by myself 🧠, no AI involved whatsoever.

@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 Nov 8, 2026

@WizardCM WizardCM 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.

Commit prefix for this should be linux-v4l2:

@xurei xurei changed the title libv4l2: Fixed video restarting when not needed linux-v4l2: Fixed video restarting when not needed Nov 8, 2026
@xurei

xurei commented Nov 8, 2026

Copy link
Copy Markdown
Author

Commit prefix for this should be linux-v4l2:

Sorry about this, I changed it accordingly.

@WizardCM WizardCM 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.

I have confirmed the original bug with a C920 and verified that this PR fixes the issue.

This branch has not been deployed

No deployments
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.

linux-v4l2: Adjusting camera controls (Zoom, Focus, etc.) triggers stream restarts on USB3 4k webcam (Elgato 4k facecam)

2 participants