Skip to content

win-capture: Initialize window capture immediately - #13858

Open
prgmitchell wants to merge 1 commit into
obsproject:masterfrom
prgmitchell:fixWindowCaptureDelay
Open

prgmitchell wants to merge 1 commit into
obsproject:masterfrom
prgmitchell:fixWindowCaptureDelay

Conversation

@prgmitchell

@prgmitchell prgmitchell commented Sep 2, 2026

Copy link
Copy Markdown
Member

Description

Initialize new window capture instances through the existing update path so the first lookup is not delayed by 1 second and instead happens on the next video tick.

NOTE: I did consider that using the OBS_SOURCE_DO_NOT_DUPLICATE flag for window capture sources would also fix but I am not sure if there is a specific reason we allow duplication for window capture sources but not display capture.

Motivation and Context

Fixes #4878

How Has This Been Tested?

Created two scenes with the same window capture source, enabled studio mode and the duplicate sources option, and then pressed the transition button to switch between the scenes. On the current release the program scene goes black for 1 second after pressing transition, with these changes it does not.

Types of changes

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

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.

@WizardCM WizardCM added kind/bug Categorizes issue or PR as related to a bug. platform/windows Categorizes issue or PR as affecting Windows specifically labels Sep 13, 2026
Comment thread plugins/win-capture/window-capture.c Outdated
Initialize new window capture instances through the existing update
path so the first lookup is not delayed by 1 second and instead happens
on the next video tick.

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

Seems fine code-wise, might require some additional behavioural testing on Windows by other maintainers.

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/windows Categorizes issue or PR as affecting Windows specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Window capture bug #4877 still happens in 27.0.1

3 participants