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
bug: obs_output_set_video_encoder2 tests the argument, not the stored slot #2491
Two upstream bugs in obs_output_set_video_encoder2() (libobs/obs-output.c.h), found while porting its slot checks (#2475). Both come from testing the encoder argument where the code should test what was actually stored in the slot:
Caption track for an empty slot.obs_encoder_get_ref(encoder) returns NULL when the encoder is being destroyed, so the slot stays empty, but if (encoder != NULL) still creates a caption track for it.
Spurious NULL warning. Clearing video slot 0 (encoder == NULL) on an output with a preferred size calls obs_encoder_set_scaled_size(NULL, ...), which logs "NULL parameter". obs_output_set_preferred_size2() already checks the slot before the same call.
Fix: test output->video_encoders[idx] (the stored slot) in both places. Both are pinned in test_output_slots_steps as "characterized, not endorsed".
Activity
rdoupe commentedon Oct 26, 2026
Claiming: #2491.
libobs: Decide output slot steps on stored encoder (obs-rust#2495)