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

Paul B Mahol onemda at gmail.com
Sat May 30 14:05:36 EEST 2020


Nobody approved this, so revert ASAP!

On 5/25/20, Jun Zhao <mypopydev at gmail.com> wrote:
> From: Jun Zhao <barryjzhao at tencent.com>
>
> move the pad/vpad related operation with more natural
> coding style.
>
> Signed-off-by: Jun Zhao <barryjzhao at 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 at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list