[FFmpeg-devel] [PATCH] lavfi/setfield: switch to filter_frame API

Stefano Sabatini stefasab at gmail.com
Sat Dec 8 17:21:57 CET 2012


On date Saturday 2012-12-08 16:50:44 +0100, Matthieu Bouron encoded:
> ---
>  libavfilter/vf_setfield.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/libavfilter/vf_setfield.c b/libavfilter/vf_setfield.c
> index c62ee36..edaa480 100644
> --- a/libavfilter/vf_setfield.c
> +++ b/libavfilter/vf_setfield.c
> @@ -24,6 +24,7 @@
>   */
>  
>  #include "avfilter.h"
> +#include "internal.h"
>  #include "video.h"
>  
>  enum SetFieldMode {
> @@ -69,10 +70,10 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
>      return 0;
>  }
>  
> -static int start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref)
> +static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref)
>  {
>      SetFieldContext *setfield = inlink->dst->priv;
> -    AVFilterBufferRef *outpicref = avfilter_ref_buffer(inpicref, ~0);
> +    AVFilterBufferRef *outpicref = inpicref;
>  
>      if (setfield->mode == MODE_PROG) {
>          outpicref->video->interlaced = 0;
> @@ -80,7 +81,7 @@ static int start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref)
>          outpicref->video->interlaced = 1;
>          outpicref->video->top_field_first = setfield->mode;
>      }
> -    return ff_start_frame(inlink->dst->outputs[0], outpicref);
> +    return ff_filter_frame(inlink->dst->outputs[0], outpicref);
>  }
>  
>  static const AVFilterPad setfield_inputs[] = {
> @@ -88,7 +89,7 @@ static const AVFilterPad setfield_inputs[] = {
>          .name             = "default",
>          .type             = AVMEDIA_TYPE_VIDEO,
>          .get_video_buffer = ff_null_get_video_buffer,
> -        .start_frame      = start_frame,
> +        .filter_frame     = filter_frame,
>      },
>      { NULL }

Applied with some minor changes, thanks.
-- 
FFmpeg = Faithless and Forgiving Multipurpose Puristic Elected Gem


More information about the ffmpeg-devel mailing list