[FFmpeg-cvslog] lavfi/aiir: Refine the pad/vpad related operation

Jun Zhao git at videolan.org
Sat May 30 14:03:46 EEST 2020


ffmpeg | branch: master | Jun Zhao <barryjzhao at tencent.com> | Mon May 25 16:10:29 2020 +0800| [018cd437f898aa72eafcd44dba263dc1ec8fcf05] | committer: Jun Zhao

lavfi/aiir: Refine the pad/vpad related operation

move the pad/vpad related operation with more natural
coding style.

Signed-off-by: Jun Zhao <barryjzhao at tencent.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=018cd437f898aa72eafcd44dba263dc1ec8fcf05
---

 libavfilter/af_aiir.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/libavfilter/af_aiir.c b/libavfilter/af_aiir.c
index 503d5b9329..214c998348 100644
--- a/libavfilter/af_aiir.c
+++ b/libavfilter/af_aiir.c
@@ -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;



More information about the ffmpeg-cvslog mailing list