From a018ab049edd12e4b36ce9649eb785cccc744705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Mon, 16 Sep 2024 11:57:35 +0200 Subject: [PATCH] utils/upload: fix use of formats with unusual sample order Fixes: https://github.com/mpv-player/mpv/issues/13398 --- src/utils/upload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/upload.c b/src/utils/upload.c index 75bd4bb1c..4a94fd184 100644 --- a/src/utils/upload.c +++ b/src/utils/upload.c @@ -206,7 +206,7 @@ pl_fmt pl_plane_find_fmt(pl_gpu gpu, int out_map[4], const struct pl_plane_data int size = data->component_size[i]; if (size && (idx >= 4 || fmt->host_bits[idx] != size)) goto next_fmt; - out_map[idx++] = data->component_map[i]; + out_map[fmt->sample_order[idx++]] = data->component_map[i]; } // Reject misaligned formats, check this last to only log such errors