[FFmpeg-cvslog] avfilter/vf_idet: factorize av_frame_free(&idet->prev)
Pascal Massimino
pascal.massimino at gmail.com
Mon Jan 19 21:42:59 CET 2015
On Mon, Jan 19, 2015 at 11:39 AM, Michael Niedermayer <git at videolan.org>
wrote:
> ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon
> Jan 19 20:24:03 2015 +0100| [5c1a8d3b7d3383b8c5a7dcfa08c7b596db3d835e] |
> committer: Michael Niedermayer
>
> avfilter/vf_idet: factorize av_frame_free(&idet->prev)
>
> Found-by: Pascal Massimino <pascal.massimino at gmail.com>
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
>
> >
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5c1a8d3b7d3383b8c5a7dcfa08c7b596db3d835e
> ---
>
> libavfilter/vf_idet.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c
> index c6ee8db..5430aba 100644
> --- a/libavfilter/vf_idet.c
> +++ b/libavfilter/vf_idet.c
> @@ -249,6 +249,8 @@ static int filter_frame(AVFilterLink *link, AVFrame
> *picref)
> return ff_filter_frame(ctx->outputs[0], picref);
> }
>
> + av_frame_free(&idet->prev);
> +
> if( picref->width != link->w
> || picref->height != link->h
> || picref->format != link->format) {
> @@ -256,13 +258,10 @@ static int filter_frame(AVFilterLink *link, AVFrame
> *picref)
> link->dst->inputs[0]->w = picref->width;
> link->dst->inputs[0]->h = picref->height;
>
> - av_frame_free(&idet->prev);
> av_frame_free(&idet->cur );
> av_frame_free(&idet->next);
> }
>
> - if (idet->prev)
> - av_frame_free(&idet->prev);
>
Ok, thanks!
> idet->prev = idet->cur;
> idet->cur = idet->next;
> idet->next = picref;
>
> _______________________________________________
> ffmpeg-cvslog mailing list
> ffmpeg-cvslog at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
>
More information about the ffmpeg-cvslog
mailing list