mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/vf_bm3d: make sure nb_jobs is at least 1
This commit is contained in:
parent
ec9d48da19
commit
f2598484b8
|
@ -748,7 +748,7 @@ static int filter_frame(AVFilterContext *ctx, AVFrame **out, AVFrame *in, AVFram
|
||||||
av_frame_copy_props(*out, in);
|
av_frame_copy_props(*out, in);
|
||||||
|
|
||||||
for (p = 0; p < s->nb_planes; p++) {
|
for (p = 0; p < s->nb_planes; p++) {
|
||||||
const int nb_jobs = FFMIN(s->nb_threads, s->planeheight[p] / s->block_size);
|
const int nb_jobs = FFMAX(1, FFMIN(s->nb_threads, s->planeheight[p] / s->block_size));
|
||||||
ThreadData td;
|
ThreadData td;
|
||||||
|
|
||||||
if (!((1 << p) & s->planes) || ctx->is_disabled) {
|
if (!((1 << p) & s->planes) || ctx->is_disabled) {
|
||||||
|
|
Loading…
Reference in New Issue