[FFmpeg-devel] [PATCH V1 2/2] doc/writing_filters: Use	ff_filter_get_nb_threads() get number of threads
    Jun Zhao 
    mypopydev at gmail.com
       
    Wed May 22 04:55:38 EEST 2019
    
    
  
From: Jun Zhao <barryjzhao at tencent.com>
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.
---
 doc/writing_filters.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/doc/writing_filters.txt b/doc/writing_filters.txt
index 98b9c6f..2e25cbe 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)));
 
     // ...
 
-- 
1.7.1
    
    
More information about the ffmpeg-devel
mailing list