ffmpeg_filter: Pass command line -threads X to filtergraph
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 24 Oct 2013 20:00:37 +0000 (22:00 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 24 Oct 2013 21:15:30 +0000 (23:15 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg_filter.c

index 80089ff..76d3be6 100644 (file)
@@ -860,6 +860,10 @@ int configure_filtergraph(FilterGraph *fg)
         if (strlen(args))
             args[strlen(args) - 1] = '\0';
         fg->graph->resample_lavr_opts = av_strdup(args);
+
+        e = av_dict_get(ost->opts, "threads", NULL, 0);
+        if (e)
+            av_opt_set(fg->graph, "threads", e->value, 0);
     }
 
     if ((ret = avfilter_graph_parse2(fg->graph, graph_desc, &inputs, &outputs)) < 0)