Unified · Split
| @@ -191,7 +191,7 @@ static av_cold int init(AVFilterContext *ctx) · 190 unmodified lines | ||
| 191 | 191 | return AVERROR(ENOMEM); |
| 192 | 192 | pad.name = name; |
| 193 | 193 | |
| 194 | − if ((ret = ff_insert_outpad(ctx, i, &pad)) < 0) { | |
| 194 | + if ((ret = ff_append_outpad(ctx, &pad)) < 0) { | |
| 195 | 195 | av_freep(&pad.name); |
| 196 | 196 | return ret; |
| 197 | 197 | } |
| @@ -836,7 +836,7 @@ static av_cold int init(AVFilterContext *ctx) · 835 unmodified lines | ||
| 836 | 836 | .type = AVMEDIA_TYPE_AUDIO, |
| 837 | 837 | }; |
| 838 | 838 | |
| 839 | − ret = ff_insert_inpad(ctx, 0, &pad); | |
| 839 | + ret = ff_append_inpad(ctx, &pad); | |
| 840 | 840 | if (ret < 0) |
| 841 | 841 | return ret; |
| 842 | 842 | |
| @@ -849,7 +849,7 @@ static av_cold int init(AVFilterContext *ctx) · 6 unmodified lines | ||
| 849 | 849 | if (!pad.name) |
| 850 | 850 | return AVERROR(ENOMEM); |
| 851 | 851 | |
| 852 | − ret = ff_insert_inpad(ctx, n + 1, &pad); | |
| 852 | + ret = ff_append_inpad(ctx, &pad); | |
| 853 | 853 | if (ret < 0) { |
| 854 | 854 | av_freep(&pad.name); |
| 855 | 855 | return ret; |
| @@ -862,7 +862,7 @@ static av_cold int init(AVFilterContext *ctx) · 6 unmodified lines | ||
| 862 | 862 | .config_props = config_output, |
| 863 | 863 | }; |
| 864 | 864 | |
| 865 | − ret = ff_insert_outpad(ctx, 0, &pad); | |
| 865 | + ret = ff_append_outpad(ctx, &pad); | |
| 866 | 866 | if (ret < 0) |
| 867 | 867 | return ret; |
| 868 | 868 | |
| @@ -873,7 +873,7 @@ static av_cold int init(AVFilterContext *ctx) · 4 unmodified lines | ||
| 873 | 873 | .config_props = config_video, |
| 874 | 874 | }; |
| 875 | 875 | |
| 876 | − ret = ff_insert_outpad(ctx, 1, &vpad); | |
| 876 | + ret = ff_append_outpad(ctx, &vpad); | |
| 877 | 877 | if (ret < 0) |
| 878 | 878 | return ret; |
| 879 | 879 | } |
| @@ -1473,7 +1473,7 @@ static av_cold int init(AVFilterContext *ctx) · 1472 unmodified lines | ||
| 1473 | 1473 | .config_props = config_output, |
| 1474 | 1474 | }; |
| 1475 | 1475 | |
| 1476 | − ret = ff_insert_outpad(ctx, 0, &pad); | |
| 1476 | + ret = ff_append_outpad(ctx, &pad); | |
| 1477 | 1477 | if (ret < 0) |
| 1478 | 1478 | return ret; |
| 1479 | 1479 | |
| @@ -1484,7 +1484,7 @@ static av_cold int init(AVFilterContext *ctx) · 4 unmodified lines | ||
| 1484 | 1484 | .config_props = config_video, |
| 1485 | 1485 | }; |
| 1486 | 1486 | |
| 1487 | − ret = ff_insert_outpad(ctx, 1, &vpad); | |
| 1487 | + ret = ff_append_outpad(ctx, &vpad); | |
| 1488 | 1488 | if (ret < 0) |
| 1489 | 1489 | return ret; |
| 1490 | 1490 | } |
| @@ -328,7 +328,7 @@ static av_cold int init(AVFilterContext *ctx) · 327 unmodified lines | ||
| 328 | 328 | }; |
| 329 | 329 | if (!name) |
| 330 | 330 | return AVERROR(ENOMEM); |
| 331 | − if ((ret = ff_insert_inpad(ctx, i, &pad)) < 0) { | |
| 331 | + if ((ret = ff_append_inpad(ctx, &pad)) < 0) { | |
| 332 | 332 | av_freep(&pad.name); |
| 333 | 333 | return ret; |
| 334 | 334 | } |
| @@ -553,7 +553,7 @@ static av_cold int init(AVFilterContext *ctx) · 552 unmodified lines | ||
| 553 | 553 | if (!pad.name) |
| 554 | 554 | return AVERROR(ENOMEM); |
| 555 | 555 | |
| 556 | − if ((ret = ff_insert_inpad(ctx, i, &pad)) < 0) { | |
| 556 | + if ((ret = ff_append_inpad(ctx, &pad)) < 0) { | |
| 557 | 557 | av_freep(&pad.name); |
| 558 | 558 | return ret; |
| 559 | 559 | } |
| @@ -196,7 +196,7 @@ static av_cold int init(AVFilterContext *ctx) · 195 unmodified lines | ||
| 196 | 196 | .type = AVMEDIA_TYPE_AUDIO, |
| 197 | 197 | }; |
| 198 | 198 | |
| 199 | − ret = ff_insert_outpad(ctx, 0, &pad); | |
| 199 | + ret = ff_append_outpad(ctx, &pad); | |
| 200 | 200 | if (ret < 0) |
| 201 | 201 | return ret; |
| 202 | 202 | |
| @@ -206,7 +206,7 @@ static av_cold int init(AVFilterContext *ctx) · 3 unmodified lines | ||
| 206 | 206 | .type = AVMEDIA_TYPE_VIDEO, |
| 207 | 207 | .config_props = config_video, |
| 208 | 208 | }; |
| 209 | − ret = ff_insert_outpad(ctx, 1, &vpad); | |
| 209 | + ret = ff_append_outpad(ctx, &vpad); | |
| 210 | 210 | if (ret < 0) |
| 211 | 211 | return ret; |
| 212 | 212 | } |
| @@ -97,9 +97,8 @@ static av_cold int init(AVFilterContext *ctx) · 96 unmodified lines | ||
| 97 | 97 | s->map[i] = ret; |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | − if ((ret = ff_insert_outpad(ctx, i, &pad)) < 0) { | |
| 100 | + if ((ret = ff_append_outpad(ctx, &pad)) < 0) | |
| 101 | 101 | return ret; |
| 102 | − } | |
| 103 | 102 | } |
| 104 | 103 | |
| 105 | 104 | fail: |
| @@ -652,7 +652,7 @@ static av_cold int init(AVFilterContext *ctx) · 651 unmodified lines | ||
| 652 | 652 | .type = AVMEDIA_TYPE_AUDIO, |
| 653 | 653 | .config_props = config_input, |
| 654 | 654 | }; |
| 655 | − if ((ret = ff_insert_inpad(ctx, 0, &pad)) < 0) | |
| 655 | + if ((ret = ff_append_inpad(ctx, &pad)) < 0) | |
| 656 | 656 | return ret; |
| 657 | 657 | |
| 658 | 658 | if (!s->map) { |
| @@ -670,7 +670,7 @@ static av_cold int init(AVFilterContext *ctx) · 11 unmodified lines | ||
| 670 | 670 | }; |
| 671 | 671 | if (!name) |
| 672 | 672 | return AVERROR(ENOMEM); |
| 673 | − if ((ret = ff_insert_inpad(ctx, i + 1, &pad)) < 0) { | |
| 673 | + if ((ret = ff_append_inpad(ctx, &pad)) < 0) { | |
| 674 | 674 | av_freep(&pad.name); |
| 675 | 675 | return ret; |
| 676 | 676 | } |
| @@ -194,7 +194,7 @@ static av_cold int join_init(AVFilterContext *ctx) · 193 unmodified lines | ||
| 194 | 194 | if (!pad.name) |
| 195 | 195 | return AVERROR(ENOMEM); |
| 196 | 196 | |
| 197 | − if ((ret = ff_insert_inpad(ctx, i, &pad)) < 0) { | |
| 197 | + if ((ret = ff_append_inpad(ctx, &pad)) < 0) { | |
| 198 | 198 | av_freep(&pad.name); |
| 199 | 199 | return ret; |
| 200 | 200 | } |
| @@ -639,7 +639,7 @@ static av_cold int init(AVFilterContext *ctx) · 638 unmodified lines | ||
| 639 | 639 | |
| 640 | 640 | pad.filter_frame = filter_frame; |
| 641 | 641 | pad.config_props = config_input; |
| 642 | − if (ff_insert_inpad(ctx, ctx->nb_inputs, &pad) < 0) { | |
| 642 | + if (ff_append_inpad(ctx, &pad) < 0) { | |
| 643 | 643 | av_freep(&pad.name); |
| 644 | 644 | return AVERROR(ENOMEM); |
| 645 | 645 | } |
| @@ -464,7 +464,7 @@ static av_cold int init(AVFilterContext *ctx) · 463 unmodified lines | ||
| 464 | 464 | return AVERROR(ENOMEM); |
| 465 | 465 | |
| 466 | 466 | pad.filter_frame = filter_frame; |
| 467 | − if (ff_insert_inpad(ctx, ctx->nb_inputs, &pad) < 0) { | |
| 467 | + if (ff_append_inpad(ctx, &pad) < 0) { | |
| 468 | 468 | av_freep(&pad.name); |
| 469 | 469 | return AVERROR(ENOMEM); |
| 470 | 470 | } |
| @@ -355,7 +355,7 @@ static av_cold int init(AVFilterContext *ctx) · 354 unmodified lines | ||
| 355 | 355 | .name = "out0", |
| 356 | 356 | .type = AVMEDIA_TYPE_AUDIO, |
| 357 | 357 | }; |
| 358 | − ret = ff_insert_outpad(ctx, 0, &pad); | |
| 358 | + ret = ff_append_outpad(ctx, &pad); | |
| 359 | 359 | if (ret < 0) |
| 360 | 360 | return ret; |
| 361 | 361 | |
| @@ -365,7 +365,7 @@ static av_cold int init(AVFilterContext *ctx) · 3 unmodified lines | ||
| 365 | 365 | .type = AVMEDIA_TYPE_VIDEO, |
| 366 | 366 | .config_props = config_video_output, |
| 367 | 367 | }; |
| 368 | − ret = ff_insert_outpad(ctx, 1, &pad); | |
| 368 | + ret = ff_append_outpad(ctx, &pad); | |
| 369 | 369 | if (ret < 0) |
| 370 | 370 | return ret; |
| 371 | 371 | } |
| @@ -319,7 +319,7 @@ static av_cold int init(AVFilterContext *ctx) · 318 unmodified lines | ||
| 319 | 319 | else |
| 320 | 320 | pad.get_buffer.audio = get_audio_buffer; |
| 321 | 321 | pad.name = av_asprintf("in%d:%c%d", seg, "va"[type], str); |
| 322 | − if ((ret = ff_insert_inpad(ctx, ctx->nb_inputs, &pad)) < 0) { | |
| 322 | + if ((ret = ff_append_inpad(ctx, &pad)) < 0) { | |
| 323 | 323 | av_freep(&pad.name); |
| 324 | 324 | return ret; |
| 325 | 325 | } |
| @@ -334,7 +334,7 @@ static av_cold int init(AVFilterContext *ctx) · 8 unmodified lines | ||
| 334 | 334 | .config_props = config_output, |
| 335 | 335 | }; |
| 336 | 336 | pad.name = av_asprintf("out:%c%d", "va"[type], str); |
| 337 | − if ((ret = ff_insert_outpad(ctx, ctx->nb_outputs, &pad)) < 0) { | |
| 337 | + if ((ret = ff_append_outpad(ctx, &pad)) < 0) { | |
| 338 | 338 | av_freep(&pad.name); |
| 339 | 339 | return ret; |
| 340 | 340 | } |
| @@ -101,18 +101,16 @@ void ff_command_queue_pop(AVFilterContext *filter) · 100 unmodified lines | ||
| 101 | 101 | av_free(c); |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | −int ff_insert_pad(unsigned idx, unsigned *count, size_t padidx_off, | |
| 104 | +int ff_append_pad(unsigned *count, | |
| 105 | 105 | AVFilterPad **pads, AVFilterLink ***links, |
| 106 | 106 | AVFilterPad *newpad) |
| 107 | 107 | { |
| 108 | 108 | AVFilterLink **newlinks; |
| 109 | 109 | AVFilterPad *newpads; |
| 110 | − unsigned i; | |
| 111 | − | |
| 112 | − idx = FFMIN(idx, *count); | |
| 110 | + unsigned idx = *count; | |
| 113 | 111 | |
| 114 | − newpads = av_realloc_array(*pads, *count + 1, sizeof(AVFilterPad)); | |
| 115 | − newlinks = av_realloc_array(*links, *count + 1, sizeof(AVFilterLink*)); | |
| 112 | + newpads = av_realloc_array(*pads, idx + 1, sizeof(*newpads)); | |
| 113 | + newlinks = av_realloc_array(*links, idx + 1, sizeof(*newlinks)); | |
| 116 | 114 | if (newpads) |
| 117 | 115 | *pads = newpads; |
| 118 | 116 | if (newlinks) |
| @@ -120,15 +118,10 @@ int ff_insert_pad(unsigned idx, unsigned *count, size_t padidx_off, · 1 unmodified line | ||
| 120 | 118 | if (!newpads || !newlinks) |
| 121 | 119 | return AVERROR(ENOMEM); |
| 122 | 120 | |
| 123 | − memmove(*pads + idx + 1, *pads + idx, sizeof(AVFilterPad) * (*count - idx)); | |
| 124 | − memmove(*links + idx + 1, *links + idx, sizeof(AVFilterLink*) * (*count - idx)); | |
| 125 | 121 | memcpy(*pads + idx, newpad, sizeof(AVFilterPad)); |
| 126 | 122 | (*links)[idx] = NULL; |
| 127 | 123 | |
| 128 | 124 | (*count)++; |
| 129 | − for (i = idx + 1; i < *count; i++) | |
| 130 | − if ((*links)[i]) | |
| 131 | − (*(unsigned *)((uint8_t *) (*links)[i] + padidx_off))++; | |
| 132 | 125 | |
| 133 | 126 | return 0; |
| 134 | 127 | } |
| @@ -552,7 +552,7 @@ static av_cold int init(AVFilterContext *ctx) · 551 unmodified lines | ||
| 552 | 552 | .type = AVMEDIA_TYPE_VIDEO, |
| 553 | 553 | .config_props = config_video_output, |
| 554 | 554 | }; |
| 555 | − ret = ff_insert_outpad(ctx, 0, &pad); | |
| 555 | + ret = ff_append_outpad(ctx, &pad); | |
| 556 | 556 | if (ret < 0) |
| 557 | 557 | return ret; |
| 558 | 558 | } |
| @@ -561,7 +561,7 @@ static av_cold int init(AVFilterContext *ctx) · 2 unmodified lines | ||
| 561 | 561 | .type = AVMEDIA_TYPE_AUDIO, |
| 562 | 562 | .config_props = config_audio_output, |
| 563 | 563 | }; |
| 564 | − ret = ff_insert_outpad(ctx, ebur128->do_video, &pad); | |
| 564 | + ret = ff_append_outpad(ctx, &pad); | |
| 565 | 565 | if (ret < 0) |
| 566 | 566 | return ret; |
| 567 | 567 | |
| @@ -173,7 +173,7 @@ static av_cold int init(AVFilterContext *ctx) · 172 unmodified lines | ||
| 173 | 173 | default: |
| 174 | 174 | av_assert0(0); |
| 175 | 175 | } |
| 176 | − if ((ret = ff_insert_inpad(ctx, i, &inpad)) < 0) { | |
| 176 | + if ((ret = ff_append_inpad(ctx, &inpad)) < 0) { | |
| 177 | 177 | av_freep(&inpad.name); |
| 178 | 178 | return ret; |
| 179 | 179 | } |
| @@ -137,7 +137,7 @@ static av_cold int init(AVFilterContext *ctx, enum AVMediaType type) · 136 unmodified lines | ||
| 137 | 137 | if (!pad.name) |
| 138 | 138 | return AVERROR(ENOMEM); |
| 139 | 139 | |
| 140 | − if ((ret = ff_insert_outpad(ctx, i, &pad)) < 0) { | |
| 140 | + if ((ret = ff_append_outpad(ctx, &pad)) < 0) { | |
| 141 | 141 | av_freep(&pad.name); |
| 142 | 142 | return ret; |
| 143 | 143 | } |
| @@ -192,7 +192,7 @@ static av_cold int init(AVFilterContext *ctx) · 191 unmodified lines | ||
| 192 | 192 | return AVERROR(ENOMEM); |
| 193 | 193 | pad.type = ctx->filter->inputs[0].type; |
| 194 | 194 | pad.request_frame = request_frame; |
| 195 | − if ((ret = ff_insert_outpad(ctx, i, &pad)) < 0) { | |
| 195 | + if ((ret = ff_append_outpad(ctx, &pad)) < 0) { | |
| 196 | 196 | av_freep(&pad.name); |
| 197 | 197 | return ret; |
| 198 | 198 | } |
| @@ -167,10 +167,10 @@ static int parse_definition(AVFilterContext *ctx, int nb_pads, int is_input, int · 166 unmodified lines | ||
| 167 | 167 | av_log(ctx, AV_LOG_DEBUG, "Add %s pad %s\n", padtype, pad.name); |
| 168 | 168 | |
| 169 | 169 | if (is_input) { |
| 170 | − ret = ff_insert_inpad(ctx, i, &pad); | |
| 170 | + ret = ff_append_inpad(ctx, &pad); | |
| 171 | 171 | } else { |
| 172 | 172 | pad.config_props = config_output; |
| 173 | − ret = ff_insert_outpad(ctx, i, &pad); | |
| 173 | + ret = ff_append_outpad(ctx, &pad); | |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | if (ret < 0) { |
| @@ -226,34 +226,29 @@ void ff_tlog_link(void *ctx, AVFilterLink *link, int end); · 225 unmodified lines | ||
| 226 | 226 | /** |
| 227 | 227 | * Insert a new pad. |
| 228 | 228 | * |
| 229 | − * @param idx Insertion point. Pad is inserted at the end if this point | |
| 230 | − * is beyond the end of the list of pads. | |
| 231 | 229 | * @param count Pointer to the number of pads in the list |
| 232 | − * @param padidx_off Offset within an AVFilterLink structure to the element | |
| 233 | − * to increment when inserting a new pad causes link | |
| 234 | − * numbering to change | |
| 235 | 230 | * @param pads Pointer to the pointer to the beginning of the list of pads |
| 236 | 231 | * @param links Pointer to the pointer to the beginning of the list of links |
| 237 | 232 | * @param newpad The new pad to add. A copy is made when adding. |
| 238 | 233 | * @return >= 0 in case of success, a negative AVERROR code on error |
| 239 | 234 | */ |
| 240 | −int ff_insert_pad(unsigned idx, unsigned *count, size_t padidx_off, | |
| 235 | +int ff_append_pad(unsigned *count, | |
| 241 | 236 | AVFilterPad **pads, AVFilterLink ***links, |
| 242 | 237 | AVFilterPad *newpad); |
| 243 | 238 | |
| 244 | 239 | /** Insert a new input pad for the filter. */ |
| 245 | −static inline int ff_insert_inpad(AVFilterContext *f, unsigned index, | |
| 240 | +static inline int ff_append_inpad(AVFilterContext *f, | |
| 246 | 241 | AVFilterPad *p) |
| 247 | 242 | { |
| 248 | − return ff_insert_pad(index, &f->nb_inputs, offsetof(AVFilterLink, dstpad), | |
| 243 | + return ff_append_pad(&f->nb_inputs, | |
| 249 | 244 | &f->input_pads, &f->inputs, p); |
| 250 | 245 | } |
| 251 | 246 | |
| 252 | 247 | /** Insert a new output pad for the filter. */ |
| 253 | −static inline int ff_insert_outpad(AVFilterContext *f, unsigned index, | |
| 248 | +static inline int ff_append_outpad(AVFilterContext *f, | |
| 254 | 249 | AVFilterPad *p) |
| 255 | 250 | { |
| 256 | − return ff_insert_pad(index, &f->nb_outputs, offsetof(AVFilterLink, srcpad), | |
| 251 | + return ff_append_pad(&f->nb_outputs, | |
| 257 | 252 | &f->output_pads, &f->outputs, p); |
| 258 | 253 | } |
| 259 | 254 | |
| @@ -56,7 +56,7 @@ static av_cold int split_init(AVFilterContext *ctx) · 55 unmodified lines | ||
| 56 | 56 | if (!pad.name) |
| 57 | 57 | return AVERROR(ENOMEM); |
| 58 | 58 | |
| 59 | − if ((ret = ff_insert_outpad(ctx, i, &pad)) < 0) { | |
| 59 | + if ((ret = ff_append_outpad(ctx, &pad)) < 0) { | |
| 60 | 60 | av_freep(&pad.name); |
| 61 | 61 | return ret; |
| 62 | 62 | } |
| @@ -306,7 +306,7 @@ static av_cold int movie_common_init(AVFilterContext *ctx) · 305 unmodified lines | ||
| 306 | 306 | return AVERROR(ENOMEM); |
| 307 | 307 | pad.config_props = movie_config_output_props; |
| 308 | 308 | pad.request_frame = movie_request_frame; |
| 309 | − if ((ret = ff_insert_outpad(ctx, i, &pad)) < 0) { | |
| 309 | + if ((ret = ff_append_outpad(ctx, &pad)) < 0) { | |
| 310 | 310 | av_freep(&pad.name); |
| 311 | 311 | return ret; |
| 312 | 312 | } |
| @@ -941,7 +941,7 @@ static av_cold int init(AVFilterContext *ctx) · 940 unmodified lines | ||
| 941 | 941 | pad.name = "source"; |
| 942 | 942 | pad.config_props = config_input; |
| 943 | 943 | |
| 944 | − if ((ret = ff_insert_inpad(ctx, 0, &pad)) < 0) | |
| 944 | + if ((ret = ff_append_inpad(ctx, &pad)) < 0) | |
| 945 | 945 | return ret; |
| 946 | 946 | |
| 947 | 947 | if (s->ref) { |
| @@ -949,7 +949,7 @@ static av_cold int init(AVFilterContext *ctx) · 1 unmodified line | ||
| 949 | 949 | pad.name = "reference"; |
| 950 | 950 | pad.config_props = NULL; |
| 951 | 951 | |
| 952 | − if ((ret = ff_insert_inpad(ctx, 1, &pad)) < 0) | |
| 952 | + if ((ret = ff_append_inpad(ctx, &pad)) < 0) | |
| 953 | 953 | return ret; |
| 954 | 954 | } |
| 955 | 955 | |
| @@ -310,13 +310,13 @@ static av_cold int decimate_init(AVFilterContext *ctx) · 309 unmodified lines | ||
| 310 | 310 | }; |
| 311 | 311 | int ret; |
| 312 | 312 | |
| 313 | − if ((ret = ff_insert_inpad(ctx, INPUT_MAIN, &pad)) < 0) | |
| 313 | + if ((ret = ff_append_inpad(ctx, &pad)) < 0) | |
| 314 | 314 | return ret; |
| 315 | 315 | |
| 316 | 316 | if (dm->ppsrc) { |
| 317 | 317 | pad.name = "clean_src"; |
| 318 | 318 | pad.config_props = NULL; |
| 319 | − if ((ret = ff_insert_inpad(ctx, INPUT_CLEANSRC, &pad)) < 0) | |
| 319 | + if ((ret = ff_append_inpad(ctx, &pad)) < 0) | |
| 320 | 320 | return ret; |
| 321 | 321 | } |
| 322 | 322 | |
| @@ -352,7 +352,7 @@ static av_cold int init(AVFilterContext *ctx) · 351 unmodified lines | ||
| 352 | 352 | pad.type = AVMEDIA_TYPE_VIDEO; |
| 353 | 353 | pad.config_props = config_output; |
| 354 | 354 | |
| 355 | − if ((ret = ff_insert_outpad(ctx, ctx->nb_outputs, &pad)) < 0) { | |
| 355 | + if ((ret = ff_append_outpad(ctx, &pad)) < 0) { | |
| 356 | 356 | av_freep(&pad.name); |
| 357 | 357 | return ret; |
| 358 | 358 | } |
| @@ -970,13 +970,13 @@ static av_cold int fieldmatch_init(AVFilterContext *ctx) · 969 unmodified lines | ||
| 970 | 970 | }; |
| 971 | 971 | int ret; |
| 972 | 972 | |
| 973 | − if ((ret = ff_insert_inpad(ctx, INPUT_MAIN, &pad)) < 0) | |
| 973 | + if ((ret = ff_append_inpad(ctx, &pad)) < 0) | |
| 974 | 974 | return ret; |
| 975 | 975 | |
| 976 | 976 | if (fm->ppsrc) { |
| 977 | 977 | pad.name = "clean_src"; |
| 978 | 978 | pad.config_props = NULL; |
| 979 | − if ((ret = ff_insert_inpad(ctx, INPUT_CLEANSRC, &pad)) < 0) | |
| 979 | + if ((ret = ff_append_inpad(ctx, &pad)) < 0) | |
| 980 | 980 | return ret; |
| 981 | 981 | } |
| 982 | 982 | |
| @@ -442,7 +442,7 @@ static av_cold int init(AVFilterContext *ctx) · 441 unmodified lines | ||
| 442 | 442 | pad.name = "source"; |
| 443 | 443 | pad.config_props = config_input; |
| 444 | 444 | |
| 445 | − if ((ret = ff_insert_inpad(ctx, 0, &pad)) < 0) | |
| 445 | + if ((ret = ff_append_inpad(ctx, &pad)) < 0) | |
| 446 | 446 | return ret; |
| 447 | 447 | |
| 448 | 448 | if (s->guidance == ON) { |
| @@ -450,7 +450,7 @@ static av_cold int init(AVFilterContext *ctx) · 1 unmodified line | ||
| 450 | 450 | pad.name = "guidance"; |
| 451 | 451 | pad.config_props = NULL; |
| 452 | 452 | |
| 453 | − if ((ret = ff_insert_inpad(ctx, 1, &pad)) < 0) | |
| 453 | + if ((ret = ff_append_inpad(ctx, &pad)) < 0) | |
| 454 | 454 | return ret; |
| 455 | 455 | } |
| 456 | 456 | |
| @@ -96,7 +96,7 @@ static av_cold int init(AVFilterContext *ctx) · 95 unmodified lines | ||
| 96 | 96 | if (!pad.name) |
| 97 | 97 | return AVERROR(ENOMEM); |
| 98 | 98 | |
| 99 | − if ((ret = ff_insert_inpad(ctx, i, &pad)) < 0){ | |
| 99 | + if ((ret = ff_append_inpad(ctx, &pad)) < 0){ | |
| 100 | 100 | av_freep(&pad.name); |
| 101 | 101 | return ret; |
| 102 | 102 | } |
| @@ -125,7 +125,7 @@ static av_cold int init(AVFilterContext *ctx) · 124 unmodified lines | ||
| 125 | 125 | if (!pad.name) |
| 126 | 126 | return AVERROR(ENOMEM); |
| 127 | 127 | |
| 128 | − if ((ret = ff_insert_inpad(ctx, i, &pad)) < 0) { | |
| 128 | + if ((ret = ff_append_inpad(ctx, &pad)) < 0) { | |
| 129 | 129 | av_freep(&pad.name); |
| 130 | 130 | return ret; |
| 131 | 131 | } |
| @@ -790,7 +790,7 @@ static av_cold int init(AVFilterContext *ctx) · 789 unmodified lines | ||
| 790 | 790 | pad.name = "main"; |
| 791 | 791 | pad.config_props = config_input; |
| 792 | 792 | |
| 793 | − if ((ret = ff_insert_inpad(ctx, 0, &pad)) < 0) | |
| 793 | + if ((ret = ff_append_inpad(ctx, &pad)) < 0) | |
| 794 | 794 | return ret; |
| 795 | 795 | |
| 796 | 796 | if (!s->inplace) { |
| @@ -798,7 +798,7 @@ static av_cold int init(AVFilterContext *ctx) · 1 unmodified line | ||
| 798 | 798 | pad.name = "alpha"; |
| 799 | 799 | pad.config_props = NULL; |
| 800 | 800 | |
| 801 | − if ((ret = ff_insert_inpad(ctx, 1, &pad)) < 0) | |
| 801 | + if ((ret = ff_append_inpad(ctx, &pad)) < 0) | |
| 802 | 802 | return ret; |
| 803 | 803 | } |
| 804 | 804 | |
| @@ -287,7 +287,7 @@ static av_cold int program_opencl_init(AVFilterContext *avctx) · 286 unmodified lines | ||
| 287 | 287 | |
| 288 | 288 | input.config_props = &ff_opencl_filter_config_input; |
| 289 | 289 | |
| 290 | − err = ff_insert_inpad(avctx, i, &input); | |
| 290 | + err = ff_append_inpad(avctx, &input); | |
| 291 | 291 | if (err < 0) { |
| 292 | 292 | av_freep(&input.name); |
| 293 | 293 | return err; |
| @@ -664,7 +664,7 @@ static av_cold int init(AVFilterContext *ctx) · 663 unmodified lines | ||
| 664 | 664 | |
| 665 | 665 | if (!pad.name) |
| 666 | 666 | return AVERROR(ENOMEM); |
| 667 | − if ((ret = ff_insert_inpad(ctx, i, &pad)) < 0) { | |
| 667 | + if ((ret = ff_append_inpad(ctx, &pad)) < 0) { | |
| 668 | 668 | av_freep(&pad.name); |
| 669 | 669 | return ret; |
| 670 | 670 | } |
| @@ -123,7 +123,7 @@ static av_cold int init(AVFilterContext *ctx) · 122 unmodified lines | ||
| 123 | 123 | if (!pad.name) |
| 124 | 124 | return AVERROR(ENOMEM); |
| 125 | 125 | |
| 126 | − if ((ret = ff_insert_inpad(ctx, i, &pad)) < 0) { | |
| 126 | + if ((ret = ff_append_inpad(ctx, &pad)) < 0) { | |
| 127 | 127 | av_freep(&pad.name); |
| 128 | 128 | return ret; |
| 129 | 129 | } |
| @@ -118,7 +118,7 @@ static av_cold int init(AVFilterContext *ctx) · 117 unmodified lines | ||
| 118 | 118 | if (!pad.name) |
| 119 | 119 | return AVERROR(ENOMEM); |
| 120 | 120 | |
| 121 | − if ((ret = ff_insert_inpad(ctx, i, &pad)) < 0) { | |
| 121 | + if ((ret = ff_append_inpad(ctx, &pad)) < 0) { | |
| 122 | 122 | av_freep(&pad.name); |
| 123 | 123 | return ret; |
| 124 | 124 | } |