From ef0f21b2734007ada3203b522c64f836bf4cc76c Mon Sep 17 00:00:00 2001 From: jp9000 Date: Mon, 9 Mar 2020 05:59:59 -0700 Subject: [PATCH] image-source: Don't use video info for color source size The problem with using obs_get_video_info for a default is that the user can change that value. A default should not be a value that is subject to change based upon the user's settings. Instead, choose a sane "normal" value, like 1920x1080. Later on, this should be replaced with a system that allows automatic resizing via the user. --- plugins/image-source/color-source.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugins/image-source/color-source.c b/plugins/image-source/color-source.c index 7b3405fc7..04d3a2c62 100644 --- a/plugins/image-source/color-source.c +++ b/plugins/image-source/color-source.c @@ -108,12 +108,9 @@ static void color_source_defaults_v1(obs_data_t *settings) static void color_source_defaults_v2(obs_data_t *settings) { - struct obs_video_info ovi; - obs_get_video_info(&ovi); - obs_data_set_default_int(settings, "color", 0xFFFFFFFF); - obs_data_set_default_int(settings, "width", ovi.base_width); - obs_data_set_default_int(settings, "height", ovi.base_height); + obs_data_set_default_int(settings, "width", 1920); + obs_data_set_default_int(settings, "height", 1080); } struct obs_source_info color_source_info_v1 = {