move the pad/vpad related operation with more natural coding style.
Unified · Split
| @@ -1180,6 +1180,10 @@ static av_cold int init(AVFilterContext *ctx) · 1179 unmodified lines | ||
| 1180 | 1180 | if (!pad.name) |
| 1181 | 1181 | return AVERROR(ENOMEM); |
| 1182 | 1182 | |
| 1183 | + ret = ff_insert_outpad(ctx, 0, &pad); | |
| 1184 | + if (ret < 0) | |
| 1185 | + return ret; | |
| 1186 | + | |
| 1183 | 1187 | if (s->response) { |
| 1184 | 1188 | vpad = (AVFilterPad){ |
| 1185 | 1189 | .name = av_strdup("filter_response"), |
| @@ -1188,13 +1192,7 @@ static av_cold int init(AVFilterContext *ctx) · 2 unmodified lines | ||
| 1188 | 1192 | }; |
| 1189 | 1193 | if (!vpad.name) |
| 1190 | 1194 | return AVERROR(ENOMEM); |
| 1191 | − } | |
| 1192 | 1195 | |
| 1193 | − ret = ff_insert_outpad(ctx, 0, &pad); | |
| 1194 | − if (ret < 0) | |
| 1195 | − return ret; | |
| 1196 | − | |
| 1197 | − if (s->response) { | |
| 1198 | 1196 | ret = ff_insert_outpad(ctx, 1, &vpad); |
| 1199 | 1197 | if (ret < 0) |
| 1200 | 1198 | return ret; |