From 919aecfd62e12070aaa8840497a867d145729a37 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sat, 17 Dec 2016 21:55:05 -0800 Subject: [PATCH] libobs: Fix format not being set for new source frames With the previous Y800 fix a bug was introduced where the format for the destination frame wouldn't be set if it wasn't Y800, causing a crash. --- libobs/obs-source.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libobs/obs-source.c b/libobs/obs-source.c index 192d65b3f..c2ff97e0a 100644 --- a/libobs/obs-source.c +++ b/libobs/obs-source.c @@ -2238,9 +2238,9 @@ static inline struct obs_source_frame *cache_video(struct obs_source *source, if (!new_frame) { struct async_frame new_af; - enum video_format format; + enum video_format format = frame->format; - if (frame->format == VIDEO_FORMAT_Y800) + if (format == VIDEO_FORMAT_Y800) format = VIDEO_FORMAT_BGRX; new_frame = obs_source_frame_create(format, -- GitLab