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: More functions dereference the main canvas mix before video is set up #2253
Several libobs functions dereference obs->data.main_canvas->mix without checking it. mix is NULL until obs_reset_video(), so each of these crashes when called before video is set up. It's the same pattern as #2237 (obs_get_video, fixed in #2252):
obs_get_main_texture (libobs/obs.c.h, about line 2290)
obs_add_raw_video_callback2 and obs_remove_raw_video_callback (about lines 3218 and 3224). A plugin is the most likely to call these early.
obs_nv12_tex_active and obs_p010_tex_active (about lines 3379 and 3385)
get_scene_dimensions (libobs/obs-scene.c.h:265)
Only a plugin, script or headless tool that calls these before video setup can hit it. The frontend resets video first. Upstream has the same code. Found while fixing #2237.
Plan
RED: a forked-child cmocka test per function, called after obs_startup() and before obs_reset_video(), expecting no crash.
GREEN: each function checks main_canvas and mix first and returns its "no video" value:
obs_get_main_texture: NULL;
the raw video callback add: refused with a warning;
the raw video callback remove: a no-op;
the *_tex_active functions: false;
get_scene_dimensions: 0×0, as before video exists.
Activity
rdoupe commentedon Oct 24, 2026
Claiming: #2253.
libobs: Answer "no video" from main canvas mix readers before video s…