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
465 vignetting_filter_slice,465 vignetting_filter_slice,
466 &vignetting_thread_data,466 &vignetting_thread_data,
467 NULL,467 NULL,
468 FFMIN(outlink->h, ctx->graph->nb_threads));468 FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
469 }469 }
470 470
471 if (lensfun->mode & (GEOMETRY_DISTORTION | SUBPIXEL_DISTORTION)) {471 if (lensfun->mode & (GEOMETRY_DISTORTION | SUBPIXEL_DISTORTION)) {
@@ -493,7 +493,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 21 unmodified lines
493 distortion_correction_filter_slice,493 distortion_correction_filter_slice,
494 &distortion_correction_thread_data,494 &distortion_correction_thread_data,
495 NULL,495 NULL,
496 FFMIN(outlink->h, ctx->graph->nb_threads));496 FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
497 497
498 av_frame_free(&in);498 av_frame_free(&in);
499 return ff_filter_frame(outlink, out);499 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