diff mbox series

[FFmpeg-devel,v2,3/5] avfilter/drawutils: remove redundant xyz format check

Message ID 20231026142327.52694-3-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>

The code above this does a whitelist on desc->flags, which now includes
the (disallowed) AV_PIX_FMT_FLAG_XYZ for XYZ formats. So there is no
more need for a separate check, here.
---
 libavfilter/drawutils.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c
index c31ab6bd5a..1081938d86 100644
--- a/libavfilter/drawutils.c
+++ b/libavfilter/drawutils.c
@@ -22,7 +22,6 @@ 
 #include <string.h>
 
 #include "libavutil/avassert.h"
-#include "libavutil/avstring.h"
 #include "libavutil/avutil.h"
 #include "libavutil/csp.h"
 #include "libavutil/intreadwrite.h"
@@ -94,8 +93,6 @@  int ff_draw_init2(FFDrawContext *draw, enum AVPixelFormat format, enum AVColorSp
         return AVERROR(ENOSYS);
     if (desc->flags & ~(AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA))
         return AVERROR(ENOSYS);
-    if (av_strstart(desc->name, "xyz", NULL))
-        return AVERROR(ENOSYS);
     if (csp == AVCOL_SPC_UNSPECIFIED)
         csp = (desc->flags & AV_PIX_FMT_FLAG_RGB) ? AVCOL_SPC_RGB : AVCOL_SPC_SMPTE170M;
     if (!(desc->flags & AV_PIX_FMT_FLAG_RGB) && !(luma = av_csp_luma_coeffs_from_avcsp(csp)))