You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
win-dshow: Turning off Autorotation leaves the camera rotated #2137
On Windows, turning off Autorotation on a Video Capture Device source does not undo the rotation it already applied.
DShowInput::OnVideoData() (plugins/win-dshow/win-dshow.cpp) passes the device's roll to obs_source_set_async_rotation() only while autorotation is on, and only when the roll changes. Nothing calls obs_source_set_async_rotation(source, 0) when the setting is turned off. So the camera stays turned by the last roll the device reported until OBS restarts or the source is recreated.
A second, smaller symptom: when Autorotation is turned back on, lastRotation still holds the old value. If the device reports that same roll again, it is not re-applied. That only matters after the first fix, or if the source was rotated by something else in between.
Upstream has the same code. This was found while fixing #2121.
Plan
When the settings are updated (DShowInput::Update, where autorotation is read), if Autorotation is now off and a rotation was applied, set the async rotation back to 0 and reset lastRotation to 0. The next frame with Autorotation on then re-applies the device's roll. The change is Windows-only, so it is verified by the Windows build and by reading the code. The rotation itself is covered by test_async_rotation_normalize (#2121).
Activity
rdoupe commentedon Oct 24, 2026
Claiming: #2137.
test: Fail the dshow rotation reset when Autorotation is turned off
win-dshow: Undo the device's roll when Autorotation is turned off
win-dshow: Undo the device's roll when Autorotation is turned off (ob…