[FFmpeg-devel] [PATCH] lavfi/idet: switch to filter_frame API
Stefano Sabatini
stefasab at gmail.com
Fri Dec 7 19:36:58 CET 2012
On date Friday 2012-12-07 11:15:50 +0100, Matthieu Bouron encoded:
> On Thu, Dec 06, 2012 at 10:47:47PM +0100, Stefano Sabatini wrote:
[...]
> From f618de74934daafbf708916488727f5d7f2c5764 Mon Sep 17 00:00:00 2001
> From: Matthieu Bouron <matthieu.bouron at gmail.com>
> Date: Thu, 6 Dec 2012 21:09:17 +0100
> Subject: [PATCH] lavfi/idet: switch to filter_frame API
>
> ---
> libavfilter/vf_idet.c | 22 +++-------------------
> 1 file changed, 3 insertions(+), 19 deletions(-)
>
> diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c
> index cc20fac..475dd2a 100644
> --- a/libavfilter/vf_idet.c
> +++ b/libavfilter/vf_idet.c
> @@ -165,7 +165,7 @@ static void filter(AVFilterContext *ctx)
> av_log(ctx, AV_LOG_DEBUG, "Single frame:%s, Multi frame:%s\n", type2str(type), type2str(idet->last_type));
> }
>
> -static int start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
> +static int filter_frame(AVFilterLink *link, AVFilterBufferRef *picref)
> {
> AVFilterContext *ctx = link->dst;
> IDETContext *idet = ctx->priv;
> @@ -175,7 +175,6 @@ static int start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
> idet->prev = idet->cur;
> idet->cur = idet->next;
> idet->next = picref;
> - link->cur_buf = NULL;
>
> if (!idet->cur)
> return 0;
> @@ -183,17 +182,6 @@ static int start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
> if (!idet->prev)
> idet->prev = avfilter_ref_buffer(idet->cur, ~0);
>
> - return ff_start_frame(ctx->outputs[0], avfilter_ref_buffer(idet->cur, ~0));
> -}
> -
> -static int end_frame(AVFilterLink *link)
> -{
> - AVFilterContext *ctx = link->dst;
> - IDETContext *idet = ctx->priv;
> -
> - if (!idet->cur)
> - return 0;
> -
> if (!idet->csp)
> idet->csp = av_pix_fmt_desc_get(link->format);
> if (idet->csp->comp[0].depth_minus1 / 8 == 1)
> @@ -201,8 +189,7 @@ static int end_frame(AVFilterLink *link)
>
> filter(ctx);
>
> - ff_draw_slice(ctx->outputs[0], 0, link->h, 1);
> - return ff_end_frame(ctx->outputs[0]);
> + return ff_filter_frame(ctx->outputs[0], avfilter_ref_buffer(idet->next, ~0));
This breaks fate-lavfi-idet. Any reason you're passing idet->next
rather than idet->cur?
--
FFmpeg = Fascinating and Fiendish Moronic Political Elected Gymnast
More information about the ffmpeg-devel
mailing list