diff mbox

[FFmpeg-devel] avfilter/vf_chromashift: Fix mixed declaration and code

Message ID 20181125031740.64000-1-mark.hsj@gmail.com
State Accepted
Commit 8108064043bfb98cbc5a5bab9da4229be5f6e846
Headers show

Commit Message

Mark Harris Nov. 25, 2018, 3:17 a.m. UTC
---
 libavfilter/vf_chromashift.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Paul B Mahol Nov. 25, 2018, 8:52 a.m. UTC | #1
On 11/25/18, Mark Harris <mark.hsj@gmail.com> wrote:
> ---
>  libavfilter/vf_chromashift.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libavfilter/vf_chromashift.c b/libavfilter/vf_chromashift.c
> index 068c3c1b68..d073256b99 100644
> --- a/libavfilter/vf_chromashift.c
> +++ b/libavfilter/vf_chromashift.c
> @@ -76,13 +76,14 @@ static int query_formats(AVFilterContext *ctx)
>          AV_PIX_FMT_NONE
>      };
>      const enum AVPixelFormat *pix_fmts;
> +    AVFilterFormats *fmts_list;
>
>      if (!strcmp(ctx->filter->name, "rgbashift"))
>          pix_fmts = rgb_pix_fmts;
>      else
>          pix_fmts = yuv_pix_fmts;
>
> -    AVFilterFormats *fmts_list = ff_make_format_list(pix_fmts);
> +    fmts_list = ff_make_format_list(pix_fmts);
>      if (!fmts_list)
>          return AVERROR(ENOMEM);
>      return ff_set_common_formats(ctx, fmts_list);
> --
> 2.19.2
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

lgtm
Michael Niedermayer Nov. 26, 2018, 10:41 p.m. UTC | #2
On Sun, Nov 25, 2018 at 09:52:58AM +0100, Paul B Mahol wrote:
> On 11/25/18, Mark Harris <mark.hsj@gmail.com> wrote:
> > ---
> >  libavfilter/vf_chromashift.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/libavfilter/vf_chromashift.c b/libavfilter/vf_chromashift.c
> > index 068c3c1b68..d073256b99 100644
> > --- a/libavfilter/vf_chromashift.c
> > +++ b/libavfilter/vf_chromashift.c
> > @@ -76,13 +76,14 @@ static int query_formats(AVFilterContext *ctx)
> >          AV_PIX_FMT_NONE
> >      };
> >      const enum AVPixelFormat *pix_fmts;
> > +    AVFilterFormats *fmts_list;
> >
> >      if (!strcmp(ctx->filter->name, "rgbashift"))
> >          pix_fmts = rgb_pix_fmts;
> >      else
> >          pix_fmts = yuv_pix_fmts;
> >
> > -    AVFilterFormats *fmts_list = ff_make_format_list(pix_fmts);
> > +    fmts_list = ff_make_format_list(pix_fmts);
> >      if (!fmts_list)
> >          return AVERROR(ENOMEM);
> >      return ff_set_common_formats(ctx, fmts_list);
> > --
> > 2.19.2
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> 
> lgtm

will apply

thx

[...]
diff mbox

Patch

diff --git a/libavfilter/vf_chromashift.c b/libavfilter/vf_chromashift.c
index 068c3c1b68..d073256b99 100644
--- a/libavfilter/vf_chromashift.c
+++ b/libavfilter/vf_chromashift.c
@@ -76,13 +76,14 @@  static int query_formats(AVFilterContext *ctx)
         AV_PIX_FMT_NONE
     };
     const enum AVPixelFormat *pix_fmts;
+    AVFilterFormats *fmts_list;
 
     if (!strcmp(ctx->filter->name, "rgbashift"))
         pix_fmts = rgb_pix_fmts;
     else
         pix_fmts = yuv_pix_fmts;
 
-    AVFilterFormats *fmts_list = ff_make_format_list(pix_fmts);
+    fmts_list = ff_make_format_list(pix_fmts);
     if (!fmts_list)
         return AVERROR(ENOMEM);
     return ff_set_common_formats(ctx, fmts_list);