Skip to content

libobs: Refuse a zero frame rate in obs_reset_video (#1713) - #2174

Merged
zackees merged 3 commits into
masterfrom
fix/1713-reset-video-fps
Oct 24, 2026
Merged

zackees merged 3 commits into
masterfrom
fix/1713-reset-video-fps

Conversation

@zackees

@zackees zackees commented Oct 24, 2026

Copy link
Copy Markdown
Member

Fixes #1713 (its last part; #1773 ported the plan and left the fps 0 rejection for a follow-up).

obs_reset_video() computed the frame interval as util_mul_div64(1e9, fps_den, fps_num) without checking either value: fps_num 0 divided by zero, and fps_den 0 gave a zero frame interval. Both now return OBS_VIDEO_INVALID_PARAM next to the existing size checks, before anything is freed, so the running video stays.

  • RED (test: obs_reset_video must refuse a zero frame rate…): the new test_video_reset_fps (Linux, xvfb, public API, so it covers C and hybrid libobs) fails zero_fps_refused_before_teardown in both the OFF and ON suites of local Tier 2.
  • GREEN: the check in libobs/obs.c.h; PR CI's Tier 2 confirms it. No existing C test or public header changed. No Rust change: the check is in the C reset path, which both backends share; the Rust video_plan takes sizes only.
  • Tier 3: not applicable (the oracle doesn't contain obs_reset_video).

@zackees

zackees commented Oct 24, 2026

Copy link
Copy Markdown
Member Author

GREEN, local Tier 2 (rust/tools/linux-validate/run.sh): 456/456 in both OFF and ON, with test_video_reset_fps passing (it failed zero_fps_refused_before_teardown in both before the fix) and test_video_output_formats unchanged. Fast Gate's lint failure was gersemi on the new .cmake; a format-only commit follows.

@zackees
zackees enabled auto-merge October 24, 2026 15:04
@zackees
zackees added this pull request to the merge queue Oct 24, 2026
Merged via the queue into master with commit 67625e4 Oct 24, 2026
35 checks passed
@zackees
zackees deleted the fix/1713-reset-video-fps branch October 26, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

rust: Port the video output conversion plan in obs.c to obs-core

1 participant