diff mbox series

[FFmpeg-devel,08/16] lavfi/drawutils: move BE check out of loop

Message ID 20211224030904.1196-9-rcombs@rcombs.me
State Accepted
Commit 52fe11ef341f1932ff694d7a1307f5eb51b70ebb
Headers show
Series [FFmpeg-devel,01/16] swscale/output: template-ize yuv2nv12cX 10-bit and 16-bit cases | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc fail Make fate failed

Commit Message

rcombs Dec. 24, 2021, 3:08 a.m. UTC
---
 libavfilter/drawutils.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c
index 88218b913f..79570e71da 100644
--- a/libavfilter/drawutils.c
+++ b/libavfilter/drawutils.c
@@ -89,6 +89,8 @@  int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
 
     if (!desc || !desc->name)
         return AVERROR(EINVAL);
+    if (desc->flags & AV_PIX_FMT_FLAG_BE)
+        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 (format == AV_PIX_FMT_P010LE || format == AV_PIX_FMT_P010BE || format == AV_PIX_FMT_P016LE || format == AV_PIX_FMT_P016BE)
@@ -101,8 +103,6 @@  int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
         /* for now, only 8-16 bits formats */
         if (c->depth < 8 || c->depth > 16)
             return AVERROR(ENOSYS);
-        if (desc->flags & AV_PIX_FMT_FLAG_BE)
-            return AVERROR(ENOSYS);
         if (c->plane >= MAX_PLANES)
             return AVERROR(ENOSYS);
         /* strange interleaving */