From 7e350379f87e7f74420b4813170fe808e2313911 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 28 Nov 2012 08:41:07 +0100 Subject: lavfi: switch to AVFrame. Deprecate AVFilterBuffer/AVFilterBufferRef and everything related to it and use AVFrame instead. --- libavfilter/vf_crop.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'libavfilter/vf_crop.c') diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c index 981dfd6cb0..2b571c4f8a 100644 --- a/libavfilter/vf_crop.c +++ b/libavfilter/vf_crop.c @@ -65,7 +65,6 @@ enum var_name { VAR_X, VAR_Y, VAR_N, - VAR_POS, VAR_T, VAR_VARS_NB }; @@ -174,7 +173,6 @@ static int config_input(AVFilterLink *link) crop->var_values[VAR_OUT_H] = crop->var_values[VAR_OH] = NAN; crop->var_values[VAR_N] = 0; crop->var_values[VAR_T] = NAN; - crop->var_values[VAR_POS] = NAN; av_image_fill_max_pixsteps(crop->max_step, NULL, pix_desc); crop->hsub = pix_desc->log2_chroma_w; @@ -243,19 +241,18 @@ static int config_output(AVFilterLink *link) return 0; } -static int filter_frame(AVFilterLink *link, AVFilterBufferRef *frame) +static int filter_frame(AVFilterLink *link, AVFrame *frame) { AVFilterContext *ctx = link->dst; CropContext *crop = ctx->priv; const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(link->format); int i; - frame->video->w = crop->w; - frame->video->h = crop->h; + frame->width = crop->w; + frame->height = crop->h; crop->var_values[VAR_T] = frame->pts == AV_NOPTS_VALUE ? NAN : frame->pts * av_q2d(link->time_base); - crop->var_values[VAR_POS] = frame->pos == -1 ? NAN : frame->pos; crop->var_values[VAR_X] = av_expr_eval(crop->x_pexpr, crop->var_values, NULL); crop->var_values[VAR_Y] = av_expr_eval(crop->y_pexpr, crop->var_values, NULL); crop->var_values[VAR_X] = av_expr_eval(crop->x_pexpr, crop->var_values, NULL); -- cgit v1.2.3