summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2010-11-24 01:32:49 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2010-11-24 01:32:49 +0000
commit3ff9995350b7914c056bbc8440f44bf725dbb1d3 (patch)
treec2d635b0967b5f823eb4461d6eb9e184151a7269
parent16d14d641c7b11638ce10562243caeaf8bfcadb2 (diff)
downloadffmpeg-3ff9995350b7914c056bbc8440f44bf725dbb1d3.tar.gz
In crop filter, reference picref after updating w/h, fix issue #2377
Originally committed as revision 25818 to svn://svn.ffmpeg.org/ffmpeg/trunk
-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;