diff options
author | Paul B Mahol <onemda@gmail.com> | 2022-11-25 19:25:57 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2022-11-25 19:40:11 +0100 |
commit | 9c8b977c1ecb62c4591f2391ed9a1d69f54d9a69 (patch) | |
tree | 3fabf4433c16d65b8ad1df05c68d3cd63a2ccad8 | |
parent | f2ea508e166b88e56c33f49634ed4cb99bd3893c (diff) |
avfilter/avf_avectorscope: fix crash when using vflip filter
-rw-r--r-- | libavfilter/avf_avectorscope.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/avf_avectorscope.c b/libavfilter/avf_avectorscope.c index 2ed85f56e5..81f22bbe8c 100644 --- a/libavfilter/avf_avectorscope.c +++ b/libavfilter/avf_avectorscope.c @@ -117,7 +117,7 @@ AVFILTER_DEFINE_CLASS(avectorscope); static void draw_dot(AudioVectorScopeContext *s, unsigned x, unsigned y) { - const int linesize = s->outpicref->linesize[0]; + const ptrdiff_t linesize = s->outpicref->linesize[0]; uint8_t *dst; if (s->zoom > 1) { @@ -128,7 +128,7 @@ static void draw_dot(AudioVectorScopeContext *s, unsigned x, unsigned y) x = FFMIN(x, s->w - 1); } - dst = &s->outpicref->data[0][y * linesize + x * 4]; + dst = s->outpicref->data[0] + y * linesize + x * 4; dst[0] = FFMIN(dst[0] + s->contrast[0], 255); dst[1] = FFMIN(dst[1] + s->contrast[1], 255); dst[2] = FFMIN(dst[2] + s->contrast[2], 255); |