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
libobs: obs_set_video_levels accepts 0, negative and NaN white levels #2209
The frontend passes config_get_uint(..., "SdrWhiteLevel") and "HdrNominalPeakLevel" from the profile. A hand-edited or imported profile can give 0, or a huge value when it holds a negative number. Plugins and scripts can pass anything, including NaN.
The draw paths divide by the SDR white level (80.0f / obs_get_video_sdr_white_level() in the async and source draws, and in the deinterlace draw). A level of 0 makes the multiplier +inf, so scRGB sources draw solid white or black on SDR canvases. A NaN level spreads into every pixel.
Upstream has the same code. This was found while scoping round 7 of the Rust port (R7-4).
Plan
RED: a real-libobs test that calls obs_set_video_levels() with 0, a negative value, NaN, ±inf and a huge value, for each level. Check what obs_get_video_sdr_white_level() and obs_get_video_hdr_nominal_peak_level() return, and that a valid pair is stored exactly.
GREEN: ignore a level that isn't finite and positive, keeping the previous value (300 and 1000 by default), with a warning. Each level is checked on its own, so a valid value in a bad pair is still stored. Every valid level behaves as before.
Activity
rdoupe commentedon Oct 24, 2026
Claiming: #2209.
test: Check obs_set_video_levels on bad levels
libobs: Ignore video levels that are not positive
libobs: Ignore video levels that are not positive (obs-rust#2270)
test: Characterize the async upload decisions
obs-source: Port the async upload parameters (obs-rust#2342)