summaryrefslogtreecommitdiffstats
path: root/mp_core.h
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-12-14 22:31:39 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-12-14 22:33:12 +0200
commitff706ee86d4ca1e31de6c6c322a3bedb819ead05 (patch)
tree91d1906a2ad112e8864824661df8a1f9dbc0bd9b /mp_core.h
parent4f610adfc29a2aa2f1159ded016ca4f8960c52e9 (diff)
downloadmpv-ff706ee86d4ca1e31de6c6c322a3bedb819ead05.tar.bz2
mpv-ff706ee86d4ca1e31de6c6c322a3bedb819ead05.tar.xz
core: avoid using sh_video->pts as "current pts"
Add a new field "video_pts" to mpctx. It records the time of the last frame flipped visible on VO. Change various code which used sh_video->pts to use either the new field or get_current_time(mpctx).
Diffstat (limited to 'mp_core.h')
-rw-r--r--mp_core.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/mp_core.h b/mp_core.h
index 206cbdacd3..1111ee49c4 100644
--- a/mp_core.h
+++ b/mp_core.h
@@ -148,6 +148,9 @@ typedef struct MPContext {
// the same value if the status line is updated at a time where no new
// video frame is shown.
double last_av_difference;
+ /* timestamp of video frame currently visible on screen
+ * (or at least queued to be flipped by VO) */
+ double video_pts;
// Timestamp from the last time some timing functions read the
// current time, in (occasionally wrapping) microseconds. Used