avfiltergraph: set deprecated filter_count.
[ffmpeg.git] / libavfilter / avfiltergraph.c
index 06b6a10..baf7399 100644 (file)
@@ -69,6 +69,10 @@ int avfilter_graph_add_filter(AVFilterGraph *graph, AVFilterContext *filter)
     graph->filters = filters;
     graph->filters[graph->nb_filters++] = filter;
 
+#if FF_API_FOO_COUNT
+    graph->filter_count = graph->nb_filters;
+#endif
+
     return 0;
 }