Commit 018cd437 authored by Jun Zhao's avatar Jun Zhao

lavfi/aiir: Refine the pad/vpad related operation

move the pad/vpad related operation with more natural
coding style.
Signed-off-by: 's avatarJun Zhao <barryjzhao@tencent.com>
parent ff8329a7
......@@ -1180,6 +1180,10 @@ static av_cold int init(AVFilterContext *ctx)
if (!pad.name)
return AVERROR(ENOMEM);
ret = ff_insert_outpad(ctx, 0, &pad);
if (ret < 0)
return ret;
if (s->response) {
vpad = (AVFilterPad){
.name = av_strdup("filter_response"),
......@@ -1188,13 +1192,7 @@ static av_cold int init(AVFilterContext *ctx)
};
if (!vpad.name)
return AVERROR(ENOMEM);
}
ret = ff_insert_outpad(ctx, 0, &pad);
if (ret < 0)
return ret;
if (s->response) {
ret = ff_insert_outpad(ctx, 1, &vpad);
if (ret < 0)
return ret;
......
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