[FFmpeg-devel] [PATCH] ffmpeg_filter: use nb_threads=1 on unused filtergraph

DeHackEd git at dehacked.net
Sat Nov 18 18:15:55 EET 2017


On 11/18/2017 05:56 AM, Michael Niedermayer wrote:
> On Thu, Nov 16, 2017 at 08:25:50PM -0500, DeHackEd wrote:
>> diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
>> index aacc185..877fd67 100644
>> --- a/fftools/ffmpeg_filter.c
>> +++ b/fftools/ffmpeg_filter.c
>> @@ -340,6 +340,7 @@ int init_complex_filtergraph(FilterGraph *fg)
>>      graph = avfilter_graph_alloc();
>>      if (!graph)
>>          return AVERROR(ENOMEM);
>> +    graph->nb_threads = 1;
> 
> if you checked that it doesnt reduce threads for simple & complex
> graphs that are used then LGTM
> 

Yes I have verified that to be the case. Test method was
$ strace -e trace=clone ./ffmpeg_g -filter_complex 'testsrc2[out]' ...

The graph is disposed of within the same function. This is why I am proposing
this change.

Number of threads is a complex filtergraph is handled by the parameter
-filter_complex_threads

> thanks
> 
> [...]
> 
> 
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 



More information about the ffmpeg-devel mailing list