mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-30 17:58:37 +08:00
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:
+10
-6
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user