[FFmpeg-devel] [PATCH 1/5] Fix crop->var_values[VAR_T] computation in the crop filter.
Stefano Sabatini
stefano.sabatini-lala
Mon Nov 1 11:37:54 CET 2010
---
libavfilter/vf_crop.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c
index c72ed2c..b455850 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 :
+ (double)picref->pts * link->time_base.num / link->time_base.den;
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);
--
1.7.1
More information about the ffmpeg-devel
mailing list