You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	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>
This commit is contained in:
		| @@ -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))); | ||||
|  | ||||
|     // ... | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user