X-Git-Url: https://git.sesse.net/?p=nageru;a=blobdiff_plain;f=nageru%2Ftheme.cpp;fp=nageru%2Ftheme.cpp;h=2bb9e807495e32a2d316ee5287a6f25b45208dc8;hp=6c75e114f97ac94899eef4e0a2f9b1c7e323e015;hb=a686614f5976c9ca8b3a7e6248cdeb8c5f2c66ec;hpb=e550c3bc3d26c2cc24abb2feb96264a50377a635 diff --git a/nageru/theme.cpp b/nageru/theme.cpp index 6c75e11..2bb9e80 100644 --- a/nageru/theme.cpp +++ b/nageru/theme.cpp @@ -1202,7 +1202,14 @@ void LiveInputWrapper::connect_card(int card_idx, const InputState &input_state) ycbcr_inputs[i]->set_texture_num(0, userdata->tex_y[frame.field_number]); ycbcr_inputs[i]->set_texture_num(1, userdata->tex_cb[frame.field_number]); ycbcr_inputs[i]->set_texture_num(2, userdata->tex_cr[frame.field_number]); - ycbcr_inputs[i]->change_ycbcr_format(userdata->ycbcr_format); + // YCbCrPlanar is used for video streams, where we can have metadata from the mux. + // Prefer that if there's no override. (Overrides are only available when using + // video as SRT cards.) + if (input_state.ycbcr_coefficients_auto[card_idx]) { + ycbcr_inputs[i]->change_ycbcr_format(userdata->ycbcr_format); + } else { + ycbcr_inputs[i]->change_ycbcr_format(input_ycbcr_format); + } ycbcr_inputs[i]->set_width(width); ycbcr_inputs[i]->set_height(height); break;