On Mon, Jan 19, 2015 at 02:43:39PM +0100, Pascal Massimino wrote:
> On Mon, Jan 19, 2015 at 1:56 PM, Michael Niedermayer <g...@videolan.org>
> wrote:
> 
> > ffmpeg | branch: master | Michael Niedermayer <michae...@gmx.at> | Mon
> > Jan 19 05:36:27 2015 +0100| [56a33b232cbb71045fa6609fda3145ea08047b7d] |
> > committer: Michael Niedermayer
> >
> > avfilter/vf_idet: flush internal buffers on parameter changes
> >
> > This is needed to auto insert the filter by default
> >
> > Signed-off-by: Michael Niedermayer <michae...@gmx.at>
> >
> > >
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=56a33b232cbb71045fa6609fda3145ea08047b7d
> > ---
> >
> >  libavfilter/vf_idet.c |   12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> >
> > diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c
> > index 72729be..c6ee8db 100644
> > --- a/libavfilter/vf_idet.c
> > +++ b/libavfilter/vf_idet.c
> > @@ -249,6 +249,18 @@ static int filter_frame(AVFilterLink *link, AVFrame
> > *picref)
> >          return ff_filter_frame(ctx->outputs[0], picref);
> >      }
> >
> > +    if(   picref->width  != link->w
> > +       || picref->height != link->h
> > +       || picref->format != link->format) {
> > +        link->dst->inputs[0]->format = picref->format;
> > +        link->dst->inputs[0]->w      = picref->width;
> > +        link->dst->inputs[0]->h      = picref->height;
> > +
> > +        av_frame_free(&idet->prev);
> >
> 
> note that this free-ing of idet->prev could be factorized with the one just
> below
> 
> 
> > +        av_frame_free(&idet->cur );
> > +        av_frame_free(&idet->next);
> > +    }
> > +
> >      if (idet->prev)
> >          av_frame_free(&idet->prev);
> >
> 
> ^^^^^^ here

factorized

thx


> 
> Otherwise, looks good to me. Good catch!
> 
> 
> >      idet->prev = idet->cur;
> >
> > _______________________________________________
> > ffmpeg-cvslog mailing list
> > ffmpeg-cvslog@ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
> >
> _______________________________________________
> ffmpeg-cvslog mailing list
> ffmpeg-cvslog@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
> 

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to