]> git.sesse.net Git - ffmpeg/commitdiff
doc/writing_filters: Use ff_filter_get_nb_threads() get number of threads
authorJun Zhao <barryjzhao@tencent.com>
Wed, 22 May 2019 01:49:43 +0000 (09:49 +0800)
committerJun Zhao <barryjzhao@tencent.com>
Wed, 22 May 2019 09:43:41 +0000 (17:43 +0800)
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>
doc/writing_filters.txt

index 98b9c6f3d29f17ffa5ea93d7dbe858ec924eaf16..2e25cbed71bc91e0deb483b9f5a9e7c62c81ff29 100644 (file)
@@ -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)));
 
     // ...