[FFmpeg-devel] [PATCH 2/3] vf_tile: update deprecated functions.

Stefano Sabatini stefasab at gmail.com
Sun Jun 10 12:59:36 CEST 2012


On date Sunday 2012-06-10 11:03:37 +0200, Nicolas George encoded:
> 
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
>  libavfilter/vf_tile.c |   10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/libavfilter/vf_tile.c b/libavfilter/vf_tile.c
> index c4d5f9c..6ae787d 100644
> --- a/libavfilter/vf_tile.c
> +++ b/libavfilter/vf_tile.c
> @@ -26,6 +26,8 @@
>  #include "libavutil/pixdesc.h"
>  #include "avfilter.h"
>  #include "drawutils.h"
> +#include "formats.h"
> +#include "video.h"
>  
>  typedef struct {
>      unsigned w, h;
> @@ -57,7 +59,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
>  
>  static int query_formats(AVFilterContext *ctx)
>  {
> -    avfilter_set_common_pixel_formats(ctx, ff_draw_supported_pixel_formats(0));
> +    ff_set_common_formats(ctx, ff_draw_supported_pixel_formats(0));
>      return 0;
>  }
>  
> @@ -106,7 +108,7 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref)
>      avfilter_copy_buffer_ref_props(outlink->out_buf, picref);
>      outlink->out_buf->video->w = outlink->w;
>      outlink->out_buf->video->h = outlink->h;
> -    avfilter_start_frame(outlink, outlink->out_buf);
> +    ff_start_frame(outlink, outlink->out_buf);
>  }
>  
>  static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
> @@ -145,8 +147,8 @@ static void end_last_frame(AVFilterContext *ctx)
>  
>      while (tile->current < tile->w * tile->h)
>          draw_blank_frame(ctx);
> -    avfilter_draw_slice(outlink, 0, outlink->out_buf->video->h, 1);
> -    avfilter_end_frame(outlink);
> +    ff_draw_slice(outlink, 0, outlink->out_buf->video->h, 1);
> +    ff_end_frame(outlink);
>      tile->current = 0;
>  }

LGTM and no need for patch in these cases, although I'm not very happy
with this crippling of the public API for godknowswhy purposes.
-- 
FFmpeg = Foolish Frenzy Maxi Problematic Eccentric Gadget


More information about the ffmpeg-devel mailing list