[FFmpeg-cvslog] lavfi/drawutils: ensure we don't support formats with non-pixel-sized offsets

rcombs git at videolan.org
Wed Jan 5 04:03:07 EET 2022


ffmpeg | branch: release/5.0 | rcombs <rcombs at rcombs.me> | Thu Dec 23 20:56:50 2021 -0600| [868820917681cb73024b2a3cd7b461b790859f0a] | committer: rcombs

lavfi/drawutils: ensure we don't support formats with non-pixel-sized offsets

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=868820917681cb73024b2a3cd7b461b790859f0a
---

 libavfilter/drawutils.c | 2 ++
 1 file changed, 2 insertions(+)

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)



More information about the ffmpeg-cvslog mailing list