]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_setpts.c
yadif: add parens around macro parameters
[ffmpeg] / libavfilter / vf_setpts.c
index 8ce7d6af6e964f78e52e234c763f83524f493c37..31fa1ef65f44940900f23350691cc3a0ba038579 100644 (file)
@@ -69,7 +69,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
     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;
@@ -111,15 +111,15 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref)
     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
@@ -133,7 +133,7 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref)
 static av_cold void uninit(AVFilterContext *ctx)
 {
     SetPTSContext *setpts = ctx->priv;
-    av_free_expr(setpts->expr);
+    av_expr_free(setpts->expr);
     setpts->expr = NULL;
 }