1
0
Fork 0

avutil/pixdesc: simplify xyz pixfmt check

This commit is contained in:
Niklas Haas 2023-10-26 13:55:09 +02:00
parent d312a33ed2
commit 93f07d98d9
1 changed files with 4 additions and 4 deletions

View File

@ -3055,13 +3055,13 @@ static int get_color_type(const AVPixFmtDescriptor *desc) {
if (desc->name) {
if (av_strstart(desc->name, "yuvj", NULL))
return FF_COLOR_YUV_JPEG;
if (av_strstart(desc->name, "xyz", NULL))
return FF_COLOR_XYZ;
}
if(desc->flags & AV_PIX_FMT_FLAG_RGB)
return FF_COLOR_RGB;
return FF_COLOR_RGB;
if(desc->flags & AV_PIX_FMT_FLAG_XYZ)
return FF_COLOR_XYZ;
if(desc->nb_components == 0)
return FF_COLOR_NA;