From 3415028d139c36406c2e7695f0c923fb01213ef1 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Fri, 29 Apr 2022 20:45:06 +0200 Subject: [PATCH] avfilter/vf_mix: fix multiple threads usage --- libavfilter/vf_mix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_mix.c b/libavfilter/vf_mix.c index c04504bba0..79c96e5aec 100644 --- a/libavfilter/vf_mix.c +++ b/libavfilter/vf_mix.c @@ -243,7 +243,7 @@ static int process_frame(FFFrameSync *fs) td.in = in; td.out = out; ff_filter_execute(ctx, mix_frames, &td, NULL, - FFMIN(s->height[0], s->nb_threads)); + FFMIN(s->height[1], s->nb_threads)); return ff_filter_frame(outlink, out); } @@ -438,7 +438,7 @@ static int tmix_filter_frame(AVFilterLink *inlink, AVFrame *in) td.out = out; td.in = s->frames; ff_filter_execute(ctx, mix_frames, &td, NULL, - FFMIN(s->height[0], ff_filter_get_nb_threads(ctx))); + FFMIN(s->height[1], s->nb_threads)); return ff_filter_frame(outlink, out); }