summaryrefslogtreecommitdiff
path: root/libavfilter/avfiltergraph.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-28 11:02:01 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-28 11:02:01 +0200
commit7381d31f2267489ed5e939707b7e77a20adc168d (patch)
tree0e5811bf6eadc8742a1ee88634e9533d29eed927 /libavfilter/avfiltergraph.c
parent945c7e399af230d9fde6df641f13a11dfc5d4954 (diff)
parent0767bfd1994c4bf22e167ffadb8f823a950aad18 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: lavfi: allow user-provided execute() callbacks Conflicts: libavfilter/avfilter.h libavfilter/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/avfiltergraph.c')
-rw-r--r--libavfilter/avfiltergraph.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index fb78a87de3..476391cf12 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -182,11 +182,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;
+ }
}
}