Actually found a file in the wild that violated this which is a protocol error (fatal).
Unified · Split
| @@ -2509,9 +2509,15 @@ static void set_color_management(struct vo_wayland_state *wl) · 2508 unmodified lines | ||
| 2509 | 2509 | hdr.prim.red.x * WAYLAND_COLOR_FACTOR, hdr.prim.red.y * WAYLAND_COLOR_FACTOR, hdr.prim.green.x * WAYLAND_COLOR_FACTOR, |
| 2510 | 2510 | hdr.prim.green.y * WAYLAND_COLOR_FACTOR, hdr.prim.blue.x * WAYLAND_COLOR_FACTOR, hdr.prim.blue.y * WAYLAND_COLOR_FACTOR, |
| 2511 | 2511 | hdr.prim.white.x * WAYLAND_COLOR_FACTOR, hdr.prim.white.y * WAYLAND_COLOR_FACTOR); |
| 2512 | − wp_image_description_creator_params_v1_set_mastering_luminance(image_creator_params, hdr.min_luma * WAYLAND_MIN_LUM_FACTOR, hdr.max_luma); | |
| 2513 | − wp_image_description_creator_params_v1_set_max_cll(image_creator_params, hdr.max_cll); | |
| 2514 | − wp_image_description_creator_params_v1_set_max_fall(image_creator_params, hdr.max_fall); | |
| 2512 | + | |
| 2513 | + if (hdr.min_luma < hdr.max_luma) | |
| 2514 | + wp_image_description_creator_params_v1_set_mastering_luminance(image_creator_params, hdr.min_luma * WAYLAND_MIN_LUM_FACTOR, hdr.max_luma); | |
| 2515 | + | |
| 2516 | + if (hdr.max_cll > hdr.min_luma && hdr.max_cll <= hdr.max_luma) | |
| 2517 | + wp_image_description_creator_params_v1_set_max_cll(image_creator_params, hdr.max_cll); | |
| 2518 | + | |
| 2519 | + if (hdr.max_fall > hdr.min_luma && hdr.max_fall <= hdr.max_luma && hdr.max_fall <= hdr.max_cll) | |
| 2520 | + wp_image_description_creator_params_v1_set_max_fall(image_creator_params, hdr.max_fall); | |
| 2515 | 2521 | } |
| 2516 | 2522 | struct wp_image_description_v1 *image_description = wp_image_description_creator_params_v1_create(image_creator_params); |
| 2517 | 2523 | wp_image_description_v1_add_listener(image_description, &image_description_listener, wl); |