summaryrefslogtreecommitdiff
path: root/libavfilter/vf_crop.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-11-02 18:40:55 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-11-02 18:40:55 +0000
commit4b3d0dc6430ee8a056d632a72f288486c7238fd8 (patch)
tree3cc984459848ed6e62178fad98e86a5c0276c3b9 /libavfilter/vf_crop.c
parent94c78709470eb67585db52b46f2eb7a69dea5cff (diff)
Fix crop->var_values[VAR_T] computation in the crop filter.
Originally committed as revision 25645 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/vf_crop.c')
-rw-r--r--libavfilter/vf_crop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c
index c72ed2c9e4..1a92082396 100644
--- a/libavfilter/vf_crop.c
+++ b/libavfilter/vf_crop.c
@@ -240,8 +240,8 @@ static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
picref->video->w = crop->w;
picref->video->h = crop->h;
- /* FIXME: when the TB will be settable */
- crop->var_values[VAR_T] = picref->pts == AV_NOPTS_VALUE ? NAN : (double)picref->pts / AV_TIME_BASE;
+ 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;
crop->var_values[VAR_X] = av_eval_expr(crop->x_pexpr, crop->var_values, NULL);
crop->var_values[VAR_Y] = av_eval_expr(crop->y_pexpr, crop->var_values, NULL);