diff mbox series

[FFmpeg-devel,v2,5/5] avformat/vf_vapoursynth: simplify xyz format check

Message ID 20231026142327.52694-5-ffmpeg@haasn.xyz
State New
Headers show
Series [FFmpeg-devel,v2,1/5] avfilter/drawutils: ban XYZ formats | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Niklas Haas Oct. 26, 2023, 2:23 p.m. UTC
From: Niklas Haas <git@haasn.dev>

---
 libavformat/vapoursynth.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/vapoursynth.c b/libavformat/vapoursynth.c
index 965d36dc2e..b79ecfcf1b 100644
--- a/libavformat/vapoursynth.c
+++ b/libavformat/vapoursynth.c
@@ -118,7 +118,8 @@  static av_cold enum AVPixelFormat match_pixfmt(const VSFormat *vsf, int c_order[
         pixfmt = av_pix_fmt_desc_get_id(pd);
 
         if (pd->flags & (AV_PIX_FMT_FLAG_BAYER | AV_PIX_FMT_FLAG_ALPHA |
-                         AV_PIX_FMT_FLAG_HWACCEL | AV_PIX_FMT_FLAG_BITSTREAM))
+                         AV_PIX_FMT_FLAG_HWACCEL | AV_PIX_FMT_FLAG_BITSTREAM |
+                         AV_PIX_FMT_FLAG_XYZ))
             continue;
 
         if (pd->log2_chroma_w != vsf->subSamplingW ||
@@ -141,9 +142,6 @@  static av_cold enum AVPixelFormat match_pixfmt(const VSFormat *vsf, int c_order[
         if (av_pix_fmt_count_planes(pixfmt) != vsf->numPlanes)
             continue;
 
-        if (strncmp(pd->name, "xyz", 3) == 0)
-            continue;
-
         if (!is_native_endian(pixfmt))
             continue;