diff options
Diffstat (limited to 'player/misc.c')
-rw-r--r-- | player/misc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/player/misc.c b/player/misc.c index 941c493cf2..a9174c41a9 100644 --- a/player/misc.c +++ b/player/misc.c @@ -93,6 +93,18 @@ double get_play_end_pts(struct MPContext *mpctx) return end; } +double get_track_seek_offset(struct MPContext *mpctx, struct track *track) +{ + struct MPOpts *opts = mpctx->opts; + if (track->selected) { + if (track->type == STREAM_AUDIO) + return -opts->audio_delay; + if (track->type == STREAM_SUB) + return -opts->sub_delay; + } + return 0; +} + float mp_get_cache_percent(struct MPContext *mpctx) { struct stream_cache_info info = {0}; |