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;