summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrcombs <rcombs@rcombs.me>2021-12-23 20:56:50 -0600
committerrcombs <rcombs@rcombs.me>2022-01-04 20:01:10 -0600
commit868820917681cb73024b2a3cd7b461b790859f0a (patch)
tree059ffc74a58c5d00e8bf4fd842e0fe17c48eebbc
parent55ff7356bf805f6d038d1b2555c44c114ae7a58a (diff)
downloadffmpeg-868820917681cb73024b2a3cd7b461b790859f0a.tar.gz
lavfi/drawutils: ensure we don't support formats with non-pixel-sized offsets
-rw-r--r--libavfilter/drawutils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c
index bcdb669bd3..5308fcbc0f 100644
--- a/libavfilter/drawutils.c
+++ b/libavfilter/drawutils.c
@@ -114,6 +114,8 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
depthb = db;
if (db * (c->offset + 1) > 16)
return AVERROR(ENOSYS);
+ if (c->offset % db)
+ return AVERROR(ENOSYS);
/* strange interleaving */
if (pixelstep[c->plane] != 0 &&
pixelstep[c->plane] != c->step)