From: Steinar H. Gunderson Date: Wed, 12 Feb 2020 16:54:57 +0000 (+0100) Subject: Fix auto-WB of certain kinds of input. X-Git-Tag: 1.9.2~42 X-Git-Url: https://git.sesse.net/?p=nageru;a=commitdiff_plain;h=1e71f1ad456d64082a1a56bbc79fe0216e5fb5e3 Fix auto-WB of certain kinds of input. --- diff --git a/nageru/theme.cpp b/nageru/theme.cpp index f3e1aa1..162c3bc 100644 --- a/nageru/theme.cpp +++ b/nageru/theme.cpp @@ -1686,9 +1686,11 @@ bool Theme::get_supports_set_wb(unsigned channel) void Theme::set_wb(unsigned channel, float r, float g, float b) { + int signal = get_channel_signal(channel); + lock_guard lock(m); - if (channel_signals.count(channel)) { - white_balance_for_signal[channel_signals[channel]] = RGBTriplet{ r, g, b }; + if (signal != -1) { + white_balance_for_signal[signal] = RGBTriplet{ r, g, b }; } call_lua_wb_callback(channel, r, g, b);