mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
lavfi: allow user-provided execute() callbacks
This commit is contained in:
@@ -168,11 +168,15 @@ AVFilterContext *avfilter_graph_alloc_filter(AVFilterGraph *graph,
|
||||
{
|
||||
AVFilterContext **filters, *s;
|
||||
|
||||
if (graph->thread_type && !graph->internal->thread) {
|
||||
int ret = ff_graph_thread_init(graph);
|
||||
if (ret < 0) {
|
||||
av_log(graph, AV_LOG_ERROR, "Error initializing threading.\n");
|
||||
return NULL;
|
||||
if (graph->thread_type && !graph->internal->thread_execute) {
|
||||
if (graph->execute) {
|
||||
graph->internal->thread_execute = graph->execute;
|
||||
} else {
|
||||
int ret = ff_graph_thread_init(graph);
|
||||
if (ret < 0) {
|
||||
av_log(graph, AV_LOG_ERROR, "Error initializing threading.\n");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user