[FFmpeg-devel] [PATCH 07/34] lavfi/mandelbrot: update deprecated functions

Paul B Mahol onemda at gmail.com
Sat Jun 16 14:07:40 CEST 2012


Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
 libavfilter/vsrc_mandelbrot.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/libavfilter/vsrc_mandelbrot.c b/libavfilter/vsrc_mandelbrot.c
index 2ecb03d..1760570 100644
--- a/libavfilter/vsrc_mandelbrot.c
+++ b/libavfilter/vsrc_mandelbrot.c
@@ -27,6 +27,8 @@
  */
 
 #include "avfilter.h"
+#include "formats.h"
+#include "video.h"
 #include "libavutil/imgutils.h"
 #include "libavutil/opt.h"
 #include "libavutil/parseutils.h"
@@ -161,7 +163,7 @@ static int query_formats(AVFilterContext *ctx)
         PIX_FMT_NONE
     };
 
-    avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts));
+    ff_set_common_formats(ctx, ff_make_format_list(pix_fmts));
     return 0;
 }
 
@@ -385,15 +387,15 @@ static void draw_mandelbrot(AVFilterContext *ctx, uint32_t *color, int linesize,
 static int request_frame(AVFilterLink *link)
 {
     MBContext *mb = link->src->priv;
-    AVFilterBufferRef *picref = avfilter_get_video_buffer(link, AV_PERM_WRITE, mb->w, mb->h);
+    AVFilterBufferRef *picref = ff_get_video_buffer(link, AV_PERM_WRITE, mb->w, mb->h);
     picref->video->sample_aspect_ratio = (AVRational) {1, 1};
     picref->pts = mb->pts++;
     picref->pos = -1;
 
-    avfilter_start_frame(link, avfilter_ref_buffer(picref, ~0));
+    ff_start_frame(link, avfilter_ref_buffer(picref, ~0));
     draw_mandelbrot(link->src, (uint32_t*)picref->data[0], picref->linesize[0]/4, picref->pts);
-    avfilter_draw_slice(link, 0, mb->h, 1);
-    avfilter_end_frame(link);
+    ff_draw_slice(link, 0, mb->h, 1);
+    ff_end_frame(link);
     avfilter_unref_buffer(picref);
 
     return 0;
-- 
1.7.7



More information about the ffmpeg-devel mailing list