From 82ccb9cba9a7bd530ba2070c90f03d0fde9af1bd Mon Sep 17 00:00:00 2001 From: Jun Zhao Date: Wed, 22 May 2019 09:49:43 +0800 Subject: [PATCH] doc/writing_filters: 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. Reviewed-by: Steven Liu Reviewed-by: Paul B Mahol Signed-off-by: Jun Zhao --- doc/writing_filters.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/writing_filters.txt b/doc/writing_filters.txt index 98b9c6f3d2..2e25cbed71 100644 --- a/doc/writing_filters.txt +++ b/doc/writing_filters.txt @@ -389,7 +389,7 @@ distributor with something like this: td.in = in; td.out = out; - ctx->internal->execute(ctx, filter_slice, &td, NULL, FFMIN(outlink->h, ctx->graph->nb_threads)); + ctx->internal->execute(ctx, filter_slice, &td, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx))); // ...