aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-11-07 18:39:54 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-11-07 18:39:54 +0000
commit688b9dad9c2ebd37be06353f69a81e86df95e70d (patch)
tree01d26ec382efb50b2bbde53799172864c782cf7a
parentc58572f87b75bd5f08aeb7a9fd8e5ff6239d4db7 (diff)
downloadffmpeg-688b9dad9c2ebd37be06353f69a81e86df95e70d.tar.gz
Change the signature of parse_filter() to make it return an error code.
Originally committed as revision 25692 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavfilter/graphparser.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index 125bd9e48e..35b6845bc4 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -141,12 +141,11 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind
/**
* Parse "filter=params"
*/
-static AVFilterContext *parse_filter(const char **buf, AVFilterGraph *graph,
- int index, AVClass *log_ctx)
+static int parse_filter(AVFilterContext **filt_ctx, const char **buf, AVFilterGraph *graph,
+ int index, AVClass *log_ctx)
{
char *opts = NULL;
char *name = av_get_token(buf, "=,;[\n");
- AVFilterContext *filt_ctx;
int ret;
if (**buf == '=') {
@@ -154,10 +153,10 @@ static AVFilterContext *parse_filter(const char **buf, AVFilterGraph *graph,
opts = av_get_token(buf, "[],;\n");
}
- ret = create_filter(&filt_ctx, graph, index, name, opts, log_ctx);
+ ret = create_filter(filt_ctx, graph, index, name, opts, log_ctx);
av_free(name);
av_free(opts);
- return filt_ctx;
+ return ret;
}
static void free_inout(AVFilterInOut *head)
@@ -326,9 +325,7 @@ int avfilter_graph_parse(AVFilterGraph *graph, const char *filters,
if (parse_inputs(&filters, &curr_inputs, &open_outputs, log_ctx) < 0)
goto fail;
- filter = parse_filter(&filters, graph, index, log_ctx);
-
- if (!filter)
+ if (parse_filter(&filter, &filters, graph, index, log_ctx) < 0)
goto fail;
if (filter->input_count == 1 && !curr_inputs && !index) {