Originally committed as revision 12742 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -84,7 +84,7 @@ static const AVClass filter_parser_class = { · 83 unmodified lines | ||
| 84 | 84 | |
| 85 | 85 | static const AVClass *log_ctx = &filter_parser_class; |
| 86 | 86 | |
| 87 | −static void uninit(AVFilterGraph *graph) | |
| 87 | +void avfilter_destroy_graph(AVFilterGraph *graph) | |
| 88 | 88 | { |
| 89 | 89 | for(; graph->filter_count > 0; graph->filter_count --) |
| 90 | 90 | avfilter_destroy(graph->filters[graph->filter_count - 1]); |
| @@ -306,7 +306,7 @@ static int load_from_desc(AVFilterGraph *graph, AVFilterGraphDesc *desc, AVFilte · 215 unmodified lines | ||
| 306 | 306 | return 0; |
| 307 | 307 | |
| 308 | 308 | fail: |
| 309 | − uninit(graph); | |
| 309 | + avfilter_destroy_graph(graph); | |
| 310 | 310 | return -1; |
| 311 | 311 | } |
| 312 | 312 | |
| @@ -58,4 +58,9 @@ int avfilter_graph_config_formats(AVFilterGraph *graphctx); · 57 unmodified lines | ||
| 58 | 58 | */ |
| 59 | 59 | int avfilter_graph_config_links(AVFilterGraph *graphctx); |
| 60 | 60 | |
| 61 | +/** | |
| 62 | + * Free a graph and destroy its links. | |
| 63 | + */ | |
| 64 | +void avfilter_destroy_graph(AVFilterGraph *graph); | |
| 65 | + | |
| 61 | 66 | #endif /* FFMPEG_AVFILTERGRAPH_H */ |