Showing the changes to libavfilter/avfiltergraph.c (1 of 8 files). Show all
Unified · Split
| @@ -168,11 +168,15 @@ AVFilterContext *avfilter_graph_alloc_filter(AVFilterGraph *graph, · 167 unmodified lines | |||
| 168 | { | 168 | { |
| 169 | AVFilterContext **filters, *s; | 169 | AVFilterContext **filters, *s; |
| 170 | 170 | ||
| 171 | if (graph->thread_type && !graph->internal->thread) { | 171 | if (graph->thread_type && !graph->internal->thread_execute) { |
| 172 | int ret = ff_graph_thread_init(graph); | 172 | if (graph->execute) { |
| 173 | if (ret < 0) { | 173 | graph->internal->thread_execute = graph->execute; |
| 174 | av_log(graph, AV_LOG_ERROR, "Error initializing threading.\n"); | 174 | } else { |
| 175 | return NULL; | 175 | int ret = ff_graph_thread_init(graph); |
| 176 | if (ret < 0) { | ||
| 177 | av_log(graph, AV_LOG_ERROR, "Error initializing threading.\n"); | ||
| 178 | return NULL; | ||
| 179 | } | ||
| 176 | } | 180 | } |
| 177 | } | 181 | } |
| 178 | 182 | ||