libobs: Start video output even if there is no mix

This fixes a change in PR 11605 that breaks Decklink video outputs.
get_mix_for_video() returns NULL for those outputs, causing
start_raw_video() to return before connecting the output.
This commit is contained in:
Marco
2025-07-12 22:32:28 +02:00
committed by Ryan Foster
parent 24597a7b8e
commit 46ce91e582
+10 -6
View File
@@ -3047,18 +3047,22 @@ void start_raw_video(video_t *v, const struct video_scale_info *conversion, uint
void (*callback)(void *param, struct video_data *frame), void *param)
{
struct obs_core_video_mix *video = get_mix_for_video(v);
if (!video)
return;
if (video_output_connect2(v, conversion, frame_rate_divisor, callback, param))
// TODO: Make affected outputs use views/canvasses, and revert this later.
// https://github.com/obsproject/obs-studio/pull/12379
// https://github.com/obsproject/obs-studio/issues/12366
if (video_output_connect2(v, conversion, frame_rate_divisor, callback, param) && video)
os_atomic_inc_long(&video->raw_active);
}
void stop_raw_video(video_t *v, void (*callback)(void *param, struct video_data *frame), void *param)
{
struct obs_core_video_mix *video = get_mix_for_video(v);
if (!video)
return;
if (video_output_disconnect2(v, callback, param))
// TODO: Make affected outputs use views/canvasses, and revert this later.
// https://github.com/obsproject/obs-studio/pull/12379
// https://github.com/obsproject/obs-studio/issues/12366
if (video_output_disconnect2(v, callback, param) && video)
os_atomic_dec_long(&video->raw_active);
}