[FFmpeg-cvslog] doc/writing_filters: Use ff_filter_get_nb_threads() get number of threads

Jun Zhao git at videolan.org
Wed May 22 13:10:09 EEST 2019


ffmpeg | branch: master | Jun Zhao <barryjzhao at tencent.com> | Wed May 22 09:49:43 2019 +0800| [82ccb9cba9a7bd530ba2070c90f03d0fde9af1bd] | committer: Jun Zhao

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 at onvideo.cn>
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Jun Zhao <barryjzhao at tencent.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=82ccb9cba9a7bd530ba2070c90f03d0fde9af1bd
---

 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)));
 
     // ...
 



More information about the ffmpeg-cvslog mailing list