History

Use more expressive names for the avfilter_insert_filter() in and out parameters.

Originally committed as revision 25235 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini committed 16 years ago

Commit 486adc51 parent fa6f4eb2 files · +8 −8Browse files

Unified · Split

2 files
  1. libavfilter/avfilter.c +5 −5
  2. libavfilter/avfilter.h +3 −3
libavfilter/avfilter.c+5−5
@@ -122,7 +122,7 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad, · 121 unmodified lines
122122 }
123123
124124 int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt,
125− unsigned in, unsigned out)
125+ unsigned filt_srcpad_idx, unsigned filt_dstpad_idx)
126126 {
127127 int ret;
128128 unsigned dstpad_idx = link->dstpad - link->dst->input_pads;
@@ -132,7 +132,7 @@ int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt, · 3 unmodified lines
132132 filt->name, link->src->name, link->dst->name);
133133
134134 link->dst->inputs[dstpad_idx] = NULL;
135− if ((ret = avfilter_link(filt, out, link->dst, dstpad_idx)) < 0) {
135+ if ((ret = avfilter_link(filt, filt_dstpad_idx, link->dst, dstpad_idx)) < 0) {
136136 /* failed to link output filter to new filter */
137137 link->dst->inputs[dstpad_idx] = link;
138138 return ret;
@@ -140,14 +140,14 @@ int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt, · 1 unmodified line
140140
141141 /* re-hookup the link to the new destination filter we inserted */
142142 link->dst = filt;
143− link->dstpad = &filt->input_pads[in];
144− filt->inputs[in] = link;
143+ link->dstpad = &filt->input_pads[filt_srcpad_idx];
144+ filt->inputs[filt_srcpad_idx] = link;
145145
146146 /* if any information on supported media formats already exists on the
147147 * link, we need to preserve that */
148148 if (link->out_formats)
149149 avfilter_formats_changeref(&link->out_formats,
150− &filt->outputs[out]->out_formats);
150+ &filt->outputs[filt_dstpad_idx]->out_formats);
151151
152152 return 0;
153153 }
libavfilter/avfilter.h+3−3
@@ -783,12 +783,12 @@ void avfilter_destroy(AVFilterContext *filter); · 782 unmodified lines
783783 *
784784 * @param link the link into which the filter should be inserted
785785 * @param filt the filter to be inserted
786− * @param in the input pad on the filter to connect
787− * @param out the output pad on the filter to connect
786+ * @param filt_srcpad_idx the input pad on the filter to connect
787+ * @param filt_dstpad_idx the output pad on the filter to connect
788788 * @return zero on success
789789 */
790790 int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt,
791− unsigned in, unsigned out);
791+ unsigned filt_srcpad_idx, unsigned filt_dstpad_idx);
792792
793793 /**
794794 * Insert a new pad.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t