summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJun Zhao <barryjzhao@tencent.com>2019-05-22 09:49:43 +0800
committerJun Zhao <barryjzhao@tencent.com>2019-05-22 17:43:41 +0800
commit82ccb9cba9a7bd530ba2070c90f03d0fde9af1bd (patch)
tree66d64707917b6b55937354db17c7b16e7cb968c2 /doc
parent98663a0bb8cb8dc0fbc7c8964ebfab9efc5c046d (diff)
downloadffmpeg-82ccb9cba9a7bd530ba2070c90f03d0fde9af1bd.tar.gz
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 <lq@onvideo.cn> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/writing_filters.txt2
1 files changed, 1 insertions, 1 deletions
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)));
// ...