Commit a8305b0e authored by Nicolas George's avatar Nicolas George

lavfi/testsrc2: fix hang with very small sizes.

Move a subtraction to the other side of the equal to avoid overflows.
parent 86c446ec
......@@ -857,8 +857,8 @@ static void test2_fill_picture(AVFilterContext *ctx, AVFrame *frame)
uint8_t alpha[256];
r = s->pts;
for (y = ymin; y < ymax - 15; y += 16) {
for (x = xmin; x < xmax - 15; x += 16) {
for (y = ymin; y + 15 < ymax; y += 16) {
for (x = xmin; x + 15 < xmax; x += 16) {
if ((x ^ y) & 16)
continue;
for (i = 0; i < 256; i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment