Showing the changes to libavfilter/avfilter.c (1 of 2 files). Show all
Unified · Split
| @@ -783,6 +783,13 @@ void avfilter_free(AVFilterContext *filter) · 782 unmodified lines | |||
| 783 | av_free(filter); | 783 | av_free(filter); |
| 784 | } | 784 | } |
| 785 | 785 | ||
| 786 | int ff_filter_get_nb_threads(AVFilterContext *ctx) | ||
| 787 | { | ||
| 788 | if (ctx->nb_threads > 0) | ||
| 789 | return FFMIN(ctx->nb_threads, ctx->graph->nb_threads); | ||
| 790 | return ctx->graph->nb_threads; | ||
| 791 | } | ||
| 792 | |||
| 786 | static int process_options(AVFilterContext *ctx, AVDictionary **options, | 793 | static int process_options(AVFilterContext *ctx, AVDictionary **options, |
| 787 | const char *args) | 794 | const char *args) |
| 788 | { | 795 | { |