[FFmpeg-devel] [PATCH] lavfi/showspectrum: add priv_class and flags to options

Stefano Sabatini stefasab at gmail.com
Tue Aug 21 01:34:23 CEST 2012


On date Tuesday 2012-08-21 01:09:09 +0200, Clément Bœsch encoded:
> On Tue, Aug 21, 2012 at 01:04:24AM +0200, Stefano Sabatini wrote:
> > ---
> >  libavfilter/avf_showspectrum.c |    7 +++++--
> >  1 files changed, 5 insertions(+), 2 deletions(-)
> > 
> > diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
> > index 095b9c7..3a5e026 100644
> > --- a/libavfilter/avf_showspectrum.c
> > +++ b/libavfilter/avf_showspectrum.c
> > @@ -47,10 +47,11 @@ typedef struct {
> >  } ShowSpectrumContext;
> >  
> >  #define OFFSET(x) offsetof(ShowSpectrumContext, x)
> > +#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
> >  
> >  static const AVOption showspectrum_options[] = {
> > -    { "size", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = "640x480"}, 0, 0 },
> > -    { "s",    "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = "640x480"}, 0, 0 },
> > +    { "size", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = "640x480"}, 0, 0, FLAGS },
> > +    { "s",    "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = "640x480"}, 0, 0, FLAGS },
> >      { NULL },
> >  };
> >  
> > @@ -311,4 +312,6 @@ AVFilter avfilter_avf_showspectrum = {
> >          },
> >          { .name = NULL }
> >      },
> > +
> > +    .priv_class = &showspectrum_class,
> >  };
> 
> LGTM

Applied.
-- 
FFmpeg = Faithless Forgiving Mastodontic Powered Earthshaking Gadget


More information about the ffmpeg-devel mailing list