Commit ed581e65 authored by Stefano Sabatini's avatar Stefano Sabatini

Rename the variable filter to filt_ctx in link_filter_inouts, as the variable...

Rename the variable filter to filt_ctx in link_filter_inouts, as the variable denotes a filter context.

Less confusing.

Originally committed as revision 25694 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 684ade49
...@@ -190,30 +190,30 @@ static void insert_inout(AVFilterInOut **inouts, AVFilterInOut *element) ...@@ -190,30 +190,30 @@ static void insert_inout(AVFilterInOut **inouts, AVFilterInOut *element)
*inouts = element; *inouts = element;
} }
static int link_filter_inouts(AVFilterContext *filter, static int link_filter_inouts(AVFilterContext *filt_ctx,
AVFilterInOut **curr_inputs, AVFilterInOut **curr_inputs,
AVFilterInOut **open_inputs, AVClass *log_ctx) AVFilterInOut **open_inputs, AVClass *log_ctx)
{ {
int pad = filter->input_count, ret; int pad = filt_ctx->input_count, ret;
while (pad--) { while (pad--) {
AVFilterInOut *p = *curr_inputs; AVFilterInOut *p = *curr_inputs;
if (!p) { if (!p) {
av_log(log_ctx, AV_LOG_ERROR, av_log(log_ctx, AV_LOG_ERROR,
"Not enough inputs specified for the \"%s\" filter.\n", "Not enough inputs specified for the \"%s\" filter.\n",
filter->filter->name); filt_ctx->filter->name);
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
*curr_inputs = (*curr_inputs)->next; *curr_inputs = (*curr_inputs)->next;
if (p->filter) { if (p->filter) {
if ((ret = link_filter(p->filter, p->pad_idx, filter, pad, log_ctx)) < 0) if ((ret = link_filter(p->filter, p->pad_idx, filt_ctx, pad, log_ctx)) < 0)
return ret; return ret;
av_free(p->name); av_free(p->name);
av_free(p); av_free(p);
} else { } else {
p->filter = filter; p->filter = filt_ctx;
p->pad_idx = pad; p->pad_idx = pad;
insert_inout(open_inputs, p); insert_inout(open_inputs, p);
} }
...@@ -222,14 +222,14 @@ static int link_filter_inouts(AVFilterContext *filter, ...@@ -222,14 +222,14 @@ static int link_filter_inouts(AVFilterContext *filter,
if (*curr_inputs) { if (*curr_inputs) {
av_log(log_ctx, AV_LOG_ERROR, av_log(log_ctx, AV_LOG_ERROR,
"Too many inputs specified for the \"%s\" filter.\n", "Too many inputs specified for the \"%s\" filter.\n",
filter->filter->name); filt_ctx->filter->name);
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
pad = filter->output_count; pad = filt_ctx->output_count;
while (pad--) { while (pad--) {
AVFilterInOut *currlinkn = av_mallocz(sizeof(AVFilterInOut)); AVFilterInOut *currlinkn = av_mallocz(sizeof(AVFilterInOut));
currlinkn->filter = filter; currlinkn->filter = filt_ctx;
currlinkn->pad_idx = pad; currlinkn->pad_idx = pad;
insert_inout(curr_inputs, currlinkn); insert_inout(curr_inputs, currlinkn);
} }
......
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