diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2008-04-04 20:09:08 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2008-04-04 20:09:08 +0000 |
commit | de0e3e81d3efa2319f14e0a6f97b90b0191c3475 (patch) | |
tree | e8b23aad99963c20ae9bf4fe4a18954810aa2daa /libavfilter | |
parent | 0c3177737b401c319ec1a9f5a11da66deb8d0a95 (diff) | |
download | ffmpeg-de0e3e81d3efa2319f14e0a6f97b90b0191c3475.tar.gz |
Move funtion to avoid forward declaration
Commited in SoC by Vitor Sessak on 2008-03-26 20:57:17
Originally committed as revision 12740 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/avfiltergraph.c | 69 |
1 files changed, 34 insertions, 35 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index 7acafe7b57..e40e30410f 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -474,6 +474,40 @@ static int parse_inouts(const char **buf, AVFilterInOut **inout, int firstpad, return pad; } +/** + * Free a graph description. + */ +void avfilter_graph_free_desc(AVFilterGraphDesc *desc) +{ + void *next; + + while(desc->filters) { + next = desc->filters->next; + av_free(desc->filters->filter); + av_free(desc->filters->args); + av_free(desc->filters); + desc->filters = next; + } + + while(desc->links) { + next = desc->links->next; + av_free(desc->links); + desc->links = next; + } + + while(desc->inputs) { + next = desc->inputs->next; + av_free(desc->inputs); + desc->inputs = next; + } + + while(desc->outputs) { + next = desc->outputs->next; + av_free(desc->outputs); + desc->outputs = next; + } +} + static AVFilterGraphDesc *parse_chain(const char *filters, int has_in) { AVFilterGraphDesc *ret; @@ -617,38 +651,3 @@ int avfilter_graph_parse_chain(AVFilterGraph *graph, const char *filters, AVFilt avfilter_graph_free_desc(desc); return 0; } - -/** - * Free a graph description. - */ -void avfilter_graph_free_desc(AVFilterGraphDesc *desc) -{ - void *next; - - while(desc->filters) { - next = desc->filters->next; - av_free(desc->filters->filter); - av_free(desc->filters->args); - av_free(desc->filters); - desc->filters = next; - } - - while(desc->links) { - next = desc->links->next; - av_free(desc->links); - desc->links = next; - } - - while(desc->inputs) { - next = desc->inputs->next; - av_free(desc->inputs); - desc->inputs = next; - } - - while(desc->outputs) { - next = desc->outputs->next; - av_free(desc->outputs); - desc->outputs = next; - } -} - |