diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-11-28 08:41:07 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-03-08 07:37:18 +0100 |
commit | 7e350379f87e7f74420b4813170fe808e2313911 (patch) | |
tree | 031201839361d40af8b4c829f9c9f179e7d9f58d /libavfilter/vf_crop.c | |
parent | 77b2cd7b41d7ec8008b6fac753c04f77824c514c (diff) |
lavfi: switch to AVFrame.
Deprecate AVFilterBuffer/AVFilterBufferRef and everything related to it
and use AVFrame instead.
Diffstat (limited to 'libavfilter/vf_crop.c')
-rw-r--r-- | libavfilter/vf_crop.c | 9 |
1 files changed, 3 insertions, 6 deletions
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); |