Commit 3ff99953 authored by Baptiste Coudurier's avatar Baptiste Coudurier

In crop filter, reference picref after updating w/h, fix issue #2377

Originally committed as revision 25818 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 16d14d64
...@@ -237,12 +237,14 @@ static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref) ...@@ -237,12 +237,14 @@ static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
{ {
AVFilterContext *ctx = link->dst; AVFilterContext *ctx = link->dst;
CropContext *crop = ctx->priv; CropContext *crop = ctx->priv;
AVFilterBufferRef *ref2 = avfilter_ref_buffer(picref, ~0); AVFilterBufferRef *ref2;
int i; int i;
picref->video->w = crop->w; picref->video->w = crop->w;
picref->video->h = crop->h; picref->video->h = crop->h;
ref2 = avfilter_ref_buffer(picref, ~0);
crop->var_values[VAR_T] = picref->pts == AV_NOPTS_VALUE ? crop->var_values[VAR_T] = picref->pts == AV_NOPTS_VALUE ?
NAN : picref->pts * av_q2d(link->time_base); NAN : picref->pts * av_q2d(link->time_base);
crop->var_values[VAR_POS] = picref->pos == -1 ? NAN : picref->pos; crop->var_values[VAR_POS] = picref->pos == -1 ? NAN : picref->pos;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment