summaryrefslogtreecommitdiff
path: root/libavfilter/vf_crop.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/vf_crop.c')
-rw-r--r--libavfilter/vf_crop.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c
index 61019ef80e..88356c6da3 100644
--- a/libavfilter/vf_crop.c
+++ b/libavfilter/vf_crop.c
@@ -237,12 +237,14 @@ static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
{
AVFilterContext *ctx = link->dst;
CropContext *crop = ctx->priv;
- AVFilterBufferRef *ref2 = avfilter_ref_buffer(picref, ~0);
+ AVFilterBufferRef *ref2;
int i;
picref->video->w = crop->w;
picref->video->h = crop->h;
+ ref2 = avfilter_ref_buffer(picref, ~0);
+
crop->var_values[VAR_T] = picref->pts == AV_NOPTS_VALUE ?
NAN : picref->pts * av_q2d(link->time_base);
crop->var_values[VAR_POS] = picref->pos == -1 ? NAN : picref->pos;