diff mbox series

[FFmpeg-devel,v2,2/2] lavfi/aiir: Refine the pad/vpad related operation

Message ID 1590394577-1502-2-git-send-email-mypopydev@gmail.com
State Accepted
Commit 018cd437f898aa72eafcd44dba263dc1ec8fcf05
Headers show
Series [FFmpeg-devel,v2,1/2] lavfi/afir: fix vpad.name leak | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Jun Zhao May 25, 2020, 8:16 a.m. UTC
From: Jun Zhao <barryjzhao@tencent.com>

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

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
---
 libavfilter/af_aiir.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

Comments

Paul B Mahol May 30, 2020, 11:05 a.m. UTC | #1
Nobody approved this, so revert ASAP!

On 5/25/20, Jun Zhao <mypopydev@gmail.com> wrote:
> From: Jun Zhao <barryjzhao@tencent.com>
>
> move the pad/vpad related operation with more natural
> coding style.
>
> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
> ---
>  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 92ff348..7971cf2 100644
> --- a/libavfilter/af_aiir.c
> +++ b/libavfilter/af_aiir.c
> @@ -1153,6 +1153,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"),
> @@ -1161,13 +1165,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;
> --
> 2.7.4
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Hendrik Leppkes May 30, 2020, 12:25 p.m. UTC | #2
On Sat, May 30, 2020 at 1:05 PM Paul B Mahol <onemda@gmail.com> wrote:
>
> Nobody approved this, so revert ASAP!
>

Simple changes don't need to be approved, as long as they are on the
list for long enough, otherwise nothing would ever get done. If you
want to review them, you should do it before they've been on the list
for several days and thus get committed.

- Hendrik
diff mbox series

Patch

diff --git a/libavfilter/af_aiir.c b/libavfilter/af_aiir.c
index 92ff348..7971cf2 100644
--- a/libavfilter/af_aiir.c
+++ b/libavfilter/af_aiir.c
@@ -1153,6 +1153,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"),
@@ -1161,13 +1165,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;