---
 doc/filters.texi        |    4 ----
 libavfilter/vf_setpts.c |   11 ++++-------
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 9a02926..4b1379d 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -1848,10 +1848,6 @@ the PTS of the first video frame
 @item INTERLACED
 tell if the current frame is interlaced
 
-@item POS
-original position in the file of the frame, or undefined if undefined
-for the current frame
-
 @item PREV_INPTS
 previous input PTS
 
diff --git a/libavfilter/vf_setpts.c b/libavfilter/vf_setpts.c
index 0c4881e..1121a6e 100644
--- a/libavfilter/vf_setpts.c
+++ b/libavfilter/vf_setpts.c
@@ -39,7 +39,6 @@ static const char *const var_names[] = {
     "N",           ///< frame number (starting at zero)
     "PHI",         ///< golden ratio
     "PI",          ///< greek pi
-    "POS",         ///< original position in the file of the frame
     "PREV_INPTS",  ///< previous  input PTS
     "PREV_OUTPTS", ///< previous output PTS
     "PTS",         ///< original pts in the file of the frame
@@ -54,7 +53,6 @@ enum var_name {
     VAR_N,
     VAR_PHI,
     VAR_PI,
-    VAR_POS,
     VAR_PREV_INPTS,
     VAR_PREV_OUTPTS,
     VAR_PTS,
@@ -102,7 +100,7 @@ static int config_input(AVFilterLink *inlink)
 #define D2TS(d)  (isnan(d) ? AV_NOPTS_VALUE : (int64_t)(d))
 #define TS2D(ts) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts))
 
-static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame)
+static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
 {
     SetPTSContext *setpts = inlink->dst->priv;
     int64_t in_pts = frame->pts;
@@ -111,19 +109,18 @@ static int filter_frame(AVFilterLink *inlink, 
AVFilterBufferRef *frame)
     if (isnan(setpts->var_values[VAR_STARTPTS]))
         setpts->var_values[VAR_STARTPTS] = TS2D(frame->pts);
 
-    setpts->var_values[VAR_INTERLACED] = frame->video->interlaced;
+    setpts->var_values[VAR_INTERLACED] = frame->interlaced_frame;
     setpts->var_values[VAR_PTS       ] = TS2D(frame->pts);
-    setpts->var_values[VAR_POS       ] = frame->pos == -1 ? NAN : frame->pos;
 
     d = av_expr_eval(setpts->expr, setpts->var_values, NULL);
     frame->pts = D2TS(d);
 
 #ifdef DEBUG
     av_log(inlink->dst, AV_LOG_DEBUG,
-           "n:%"PRId64" interlaced:%d pos:%"PRId64" pts:%"PRId64" t:%f -> 
pts:%"PRId64" t:%f\n",
+           "n:%"PRId64" interlaced:%d pts:%"PRId64" t:%f -> pts:%"PRId64" 
t:%f\n",
            (int64_t)setpts->var_values[VAR_N],
            (int)setpts->var_values[VAR_INTERLACED],
-           frame->pos, in_pts, in_pts * av_q2d(inlink->time_base),
+           in_pts, in_pts * av_q2d(inlink->time_base),
            frame->pts, frame->pts * av_q2d(inlink->time_base));
 #endif
 
-- 
1.7.10.4

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to