History

lavfi/lensfun: Use ff_filter_get_nb_threads() get number of threads

ff_filter_get_nb_threads() respect AVFilterContext.nb_threads and graph->nb_threads both, in most case, we perfer this API than using ctx->graph->nb_threads directly.

Jun Zhao committed 7 years ago

Commit 98663a01 parent ecc09651 file · +2 −2Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_lensfun.c+2−2
@@ -465,7 +465,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 464 unmodified lines
465465 vignetting_filter_slice,
466466 &vignetting_thread_data,
467467 NULL,
468− FFMIN(outlink->h, ctx->graph->nb_threads));
468+ FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
469469 }
470470
471471 if (lensfun->mode & (GEOMETRY_DISTORTION | SUBPIXEL_DISTORTION)) {
@@ -493,7 +493,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 21 unmodified lines
493493 distortion_correction_filter_slice,
494494 &distortion_correction_thread_data,
495495 NULL,
496− FFMIN(outlink->h, ctx->graph->nb_threads));
496+ FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
497497
498498 av_frame_free(&in);
499499 return ff_filter_frame(outlink, out);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t