[FFmpeg-devel] [PATCH] lavfi/alphamerge: switch to ff_filter_frame() API

Clément Bœsch ubitux at gmail.com
Sun Dec 2 02:11:27 CET 2012


On Sun, Dec 02, 2012 at 01:53:42AM +0100, Stefano Sabatini wrote:
> ---
>  libavfilter/vf_alphamerge.c |   18 ++++--------------
>  1 file changed, 4 insertions(+), 14 deletions(-)
> 
> diff --git a/libavfilter/vf_alphamerge.c b/libavfilter/vf_alphamerge.c
> index 1ec9d00..0163bf1 100644
> --- a/libavfilter/vf_alphamerge.c
> +++ b/libavfilter/vf_alphamerge.c
> @@ -95,9 +95,6 @@ static int config_output(AVFilterLink *outlink)
>      return 0;
>  }
>  
> -static int start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref) {return 0;}
> -static int draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) {return 0;}
> -
>  static void draw_frame(AVFilterContext *ctx,
>                         AVFilterBufferRef *main_buf,
>                         AVFilterBufferRef *alpha_buf)
> @@ -127,10 +124,9 @@ static void draw_frame(AVFilterContext *ctx,
>                     FFMIN(main_linesize, alpha_linesize));
>          }
>      }
> -    ff_draw_slice(ctx->outputs[0], 0, h, 1);
>  }
>  
> -static int end_frame(AVFilterLink *inlink)
> +static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame)
>  {
>      AVFilterContext *ctx = inlink->dst;
>      AlphaMergeContext *merge = ctx->priv;
> @@ -139,7 +135,6 @@ static int end_frame(AVFilterLink *inlink)
>      struct FFBufQueue *queue =
>          (is_alpha ? &merge->queue_alpha : &merge->queue_main);
>      ff_bufqueue_add(ctx, queue, inlink->cur_buf);
> -    inlink->cur_buf = NULL;
>  
>      while (1) {
>          AVFilterBufferRef *main_buf, *alpha_buf;
> @@ -151,10 +146,9 @@ static int end_frame(AVFilterLink *inlink)
>          alpha_buf = ff_bufqueue_get(&merge->queue_alpha);
>  
>          ctx->outputs[0]->out_buf = main_buf;

Is that still necessary/working with ff_filter_frame?

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121202/e3fa1231/attachment.asc>


More information about the ffmpeg-devel mailing list