]> git.sesse.net Git - ffmpeg/commitdiff
lavfi: add link.current_pts field.
authorNicolas George <george@nsup.org>
Thu, 24 Sep 2015 08:05:42 +0000 (10:05 +0200)
committerNicolas George <george@nsup.org>
Tue, 22 Dec 2015 14:55:00 +0000 (15:55 +0100)
libavfilter/avfilter.c
libavfilter/avfilter.h

index fc6d49d90997376030b7d99b4e8f810b6974dabb..2911b48fd86464208a71824659398970174d6c76 100644 (file)
@@ -238,6 +238,7 @@ int avfilter_config_links(AVFilterContext *filter)
         }
 
         inlink = link->src->nb_inputs ? link->src->inputs[0] : NULL;
+        link->current_pts =
         link->current_pts_us = AV_NOPTS_VALUE;
 
         switch (link->init_state) {
@@ -443,6 +444,7 @@ void ff_update_link_current_pts(AVFilterLink *link, int64_t pts)
 {
     if (pts == AV_NOPTS_VALUE)
         return;
+    link->current_pts = pts;
     link->current_pts_us = av_rescale_q(pts, link->time_base, AV_TIME_BASE_Q);
     /* TODO use duration */
     if (link->graph && link->age_index >= 0)
index dec6a9198ab13310617e9ecc1cbfd153aab23356..f2a934eda0498f84b64ce53a3bc2c44b06a31cd3 100644 (file)
@@ -433,6 +433,12 @@ struct AVFilterLink {
      */
     struct AVFilterGraph *graph;
 
+    /**
+     * Current timestamp of the link, as defined by the most recent
+     * frame(s), in link time_base units.
+     */
+    int64_t current_pts;
+
     /**
      * Current timestamp of the link, as defined by the most recent
      * frame(s), in AV_TIME_BASE units.