[FFmpeg-devel] [PATCH] lavfi/blackframe: add support for named options

Stefano Sabatini stefasab at gmail.com
Sat Mar 16 01:00:18 CET 2013


On date Saturday 2013-03-16 00:13:06 +0100, Clément Bœsch encoded:
> On Sat, Mar 16, 2013 at 12:07:44AM +0100, Stefano Sabatini wrote:
> > TODO: bump micro
> > ---
> >  doc/filters.texi            |   22 ++++++++++++++--------
> >  libavfilter/vf_blackframe.c |   38 +++++++++++++++++++++++++++++---------
> >  2 files changed, 43 insertions(+), 17 deletions(-)
[...]
> > +static av_cold void uninit(AVFilterContext *ctx)
> > +{
> > +    BlackFrameContext *blackframe = ctx->priv;
> > +    av_opt_free(blackframe);
> > +}
> > +
> 
> The av_opt_free() could be in the init function, but that'snot important.

I agree it's not important, but I prefer this way to avoid more
changes in case another option (like a string) is added, which is
pretty unlikely, or the filter is used as a template.

> 
> >  static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
> >  {
> >      AVFilterContext *ctx = inlink->dst;
> > @@ -135,10 +152,13 @@ AVFilter avfilter_vf_blackframe = {
> >  
> >      .priv_size = sizeof(BlackFrameContext),
> >      .init      = init,
> > +    .uninit    = uninit,
> >  
> >      .query_formats = query_formats,
> >  
> >      .inputs    = avfilter_vf_blackframe_inputs,
> >  
> >      .outputs   = avfilter_vf_blackframe_outputs,
> > +
> > +    .priv_class = &blackframe_class,
> 
> Rest LGTM

Will push it soon, thanks for the review.
-- 
FFmpeg = Free and Forgiving Mind-dumbing Powered Ecumenical Gladiator


More information about the ffmpeg-devel mailing list