avfilter/vf_codecview: fix heap buffer overflow

And improve the performance by a little bit.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
Zhao Zhili 2023-12-29 05:56:43 +08:00
parent 797f0b27c1
commit 99debe5f82

View File

@ -216,9 +216,6 @@ static void draw_block_rectangle(uint8_t *buf, int sx, int sy, int w, int h, ptr
buf[sx + w - 1] = color;
buf += stride;
}
for (int x = sx; x < sx + w; x++)
buf[x] = color;
}
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)