]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/avfiltergraph.c
lavfi doxy: add buffer{src,sink}.h to the main lavfi doxy group
[ffmpeg] / libavfilter / avfiltergraph.c
index 236980ff188606a5fb7d5dc98978c22d02f16f04..0fc385c3a663a76aed96172b7390b5c096f6dc3c 100644 (file)
@@ -139,7 +139,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
 }
 #endif
 
-int avfilter_graph_create_filter(AVFilterContext **filt_ctx, AVFilter *filt,
+int avfilter_graph_create_filter(AVFilterContext **filt_ctx, const AVFilter *filt,
                                  const char *name, const char *args, void *opaque,
                                  AVFilterGraph *graph_ctx)
 {
@@ -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;
+            }
         }
     }