1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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

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;