Use a reasonable default for unspecified YUV colorspace

This commit is contained in:
Sam Lantinga 2024-02-05 11:20:14 -08:00
parent 240158f3e8
commit c3e4481d56
8 changed files with 138 additions and 87 deletions

View file

@ -558,7 +558,7 @@ static int D3D_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture, SDL_P
}
texturedata->shader = SHADER_YUV;
texturedata->shader_params = SDL_GetYCbCRtoRGBConversionMatrix(texture->colorspace);
texturedata->shader_params = SDL_GetYCbCRtoRGBConversionMatrix(texture->colorspace, texture->w, texture->h, 8);
if (texturedata->shader_params == NULL) {
return SDL_SetError("Unsupported YUV colorspace");
}