[FFmpeg-devel] [PATCH v2 4/5] avutil/pixdesc: simplify xyz pixfmt check
Niklas Haas
ffmpeg at haasn.xyz
Thu Oct 26 17:23:26 EEST 2023
From: Niklas Haas <git at haasn.dev>
---
libavutil/pixdesc.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index f2647d3d55..4e4a63e287 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -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;
--
2.42.0
More information about the ffmpeg-devel
mailing list