SetPTSContext *setpts = ctx->priv;
int ret;
- if ((ret = av_parse_expr(&setpts->expr, args ? args : "PTS",
+ if ((ret = av_expr_parse(&setpts->expr, args ? args : "PTS",
var_names, NULL, NULL, NULL, NULL, 0, ctx)) < 0) {
av_log(ctx, AV_LOG_ERROR, "Error while parsing expression '%s'\n", args);
return ret;
setpts->var_values[VAR_PTS ] = TS2D(inpicref->pts);
setpts->var_values[VAR_POS ] = inpicref->pos == -1 ? NAN : inpicref->pos;
- d = av_eval_expr(setpts->expr, setpts->var_values, NULL);
+ d = av_expr_eval(setpts->expr, setpts->var_values, NULL);
outpicref->pts = D2TS(d);
#ifdef DEBUG
av_log(inlink->dst, AV_LOG_DEBUG,
- "n:%"PRId64" interlaced:%d pos:%d pts:%"PRId64" t:%f -> pts:%"PRId64" t:%f\n",
+ "n:%"PRId64" interlaced:%d pos:%"PRId64" pts:%"PRId64" t:%f -> pts:%"PRId64" t:%f\n",
(int64_t)setpts->var_values[VAR_N],
(int)setpts->var_values[VAR_INTERLACED],
- (int)setpts->var_values[VAR_POS],
+ inpicref ->pos,
inpicref ->pts, inpicref ->pts * av_q2d(inlink->time_base),
outpicref->pts, outpicref->pts * av_q2d(inlink->time_base));
#endif
static av_cold void uninit(AVFilterContext *ctx)
{
SetPTSContext *setpts = ctx->priv;
- av_free_expr(setpts->expr);
+ av_expr_free(setpts->expr);
setpts->expr = NULL;
}