summaryrefslogtreecommitdiff
path: root/libavfilter/avfilter.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-03-31 13:02:55 +0200
committerAnton Khirnov <anton@khirnov.net>2013-04-11 20:38:48 +0200
commit1565cbc65cbb9f95c11367314a080068895e0cf0 (patch)
treeb97be56bae403beb5e75d2328833dca9af148792 /libavfilter/avfilter.c
parent111367263af41c88a44bd763ceefc11d53a7f655 (diff)
lavfi: make avfilter_free() remove the filter from its graph.
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r--libavfilter/avfilter.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 7032f2df28..c32ae1745a 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -430,6 +430,9 @@ void avfilter_free(AVFilterContext *filter)
int i;
AVFilterLink *link;
+ if (filter->graph)
+ ff_filter_graph_remove_filter(filter->graph, filter);
+
if (filter->filter->uninit)
filter->filter->uninit(filter);