mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
lavfi: update some deprecated functions
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
@@ -31,6 +31,8 @@
|
||||
#include "libavutil/parseutils.h"
|
||||
#include "libavutil/random_seed.h"
|
||||
#include "avfilter.h"
|
||||
#include "formats.h"
|
||||
#include "video.h"
|
||||
|
||||
typedef struct {
|
||||
const AVClass *class;
|
||||
@@ -305,7 +307,7 @@ static int request_frame(AVFilterLink *outlink)
|
||||
{
|
||||
CellAutoContext *cellauto = outlink->src->priv;
|
||||
AVFilterBufferRef *picref =
|
||||
avfilter_get_video_buffer(outlink, AV_PERM_WRITE, cellauto->w, cellauto->h);
|
||||
ff_get_video_buffer(outlink, AV_PERM_WRITE, cellauto->w, cellauto->h);
|
||||
picref->video->sample_aspect_ratio = (AVRational) {1, 1};
|
||||
if (cellauto->generation == 0 && cellauto->start_full) {
|
||||
int i;
|
||||
@@ -322,9 +324,9 @@ static int request_frame(AVFilterLink *outlink)
|
||||
show_cellauto_row(outlink->src);
|
||||
#endif
|
||||
|
||||
avfilter_start_frame(outlink, avfilter_ref_buffer(picref, ~0));
|
||||
avfilter_draw_slice(outlink, 0, cellauto->h, 1);
|
||||
avfilter_end_frame(outlink);
|
||||
ff_start_frame(outlink, avfilter_ref_buffer(picref, ~0));
|
||||
ff_draw_slice(outlink, 0, cellauto->h, 1);
|
||||
ff_end_frame(outlink);
|
||||
avfilter_unref_buffer(picref);
|
||||
|
||||
return 0;
|
||||
@@ -333,7 +335,7 @@ static int request_frame(AVFilterLink *outlink)
|
||||
static int query_formats(AVFilterContext *ctx)
|
||||
{
|
||||
static const enum PixelFormat pix_fmts[] = { PIX_FMT_MONOBLACK, 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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user