Commit 8a012d07 authored by vitor's avatar vitor

Move funtion to avoid forward declaration

Commited in SoC by Vitor Sessak on 2008-03-26 20:57:17


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12740 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 5aebe55d
......@@ -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;
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment