Fix crash with for example:
ffmpeg -f lavfi -i testsrc=568x320 -threads 3 -vf format=yuv420p,colormatrix=bt709:smpte170m -f null -
... | ... |
@@ -416,7 +416,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in) |
416 | 416 |
FFMIN(in->height, ctx->graph->nb_threads)); |
417 | 417 |
else if (in->format == AV_PIX_FMT_YUV420P) |
418 | 418 |
ctx->internal->execute(ctx, process_slice_yuv420p, &td, NULL, |
419 |
- FFMIN(in->height, ctx->graph->nb_threads)); |
|
419 |
+ FFMAX(1, FFMIN(in->height, ctx->graph->nb_threads) & ~1)); |
|
420 | 420 |
else |
421 | 421 |
ctx->internal->execute(ctx, process_slice_uyvy422, &td, NULL, |
422 | 422 |
FFMIN(in->height, ctx->graph->nb_threads)); |