From a6ca1677941b817cce401eb4d75f9c049b789b55 Mon Sep 17 00:00:00 2001 From: Leo Izen Date: Sun, 3 Dec 2017 20:26:42 -0500 Subject: player: add get_play_start_pts Added a get_play_start_pts function to coincide with the already-existing get_play_end_pts. This prevents code duplication and also serves to make it so code that probes the start time (such as get_current_pos_ratio) will work correctly with chapters. Included is a bug fix for misc.c/rel_time_to_abs that makes it work correctly with chapters when --rebase-start-time=no is set. --- player/core.h | 1 + 1 file changed, 1 insertion(+) (limited to 'player/core.h') diff --git a/player/core.h b/player/core.h index c3ceefd17d..80d7ad88f4 100644 --- a/player/core.h +++ b/player/core.h @@ -542,6 +542,7 @@ void issue_refresh_seek(struct MPContext *mpctx, enum seek_precision min_prec); // misc.c double rel_time_to_abs(struct MPContext *mpctx, struct m_rel_time t); double get_play_end_pts(struct MPContext *mpctx); +double get_play_start_pts(struct MPContext *mpctx); void merge_playlist_files(struct playlist *pl); float mp_get_cache_percent(struct MPContext *mpctx); bool mp_get_cache_idle(struct MPContext *mpctx); -- cgit v1.2.3