summaryrefslogtreecommitdiffstats
path: root/player/core.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-05-27 01:46:34 +0200
committerwm4 <wm4@nowhere>2019-09-19 20:37:05 +0200
commitc7269e4e84f4d0a0709a560acbfe2fa3b02a5527 (patch)
tree696322ad37985d511a2c9f82561a751e9923797d /player/core.h
parent878d4ea2ee22cc8d11652aee0fe144ca3f6ae131 (diff)
downloadmpv-c7269e4e84f4d0a0709a560acbfe2fa3b02a5527.tar.bz2
mpv-c7269e4e84f4d0a0709a560acbfe2fa3b02a5527.tar.xz
player: fix --loop with backward playback
Obviously should seek back to the end of the file when it loops. Also remove some minor code duplication around start times. This isn't the correct solution by the way. Rather than hoping we know a reasonable start/end time, this stuff should instruct the demuxer to seek to the exact location. It'll work with 99% of all normal files, but add an appropriate comment (that basically says the function is bullshit) to get_start_time() anyway.
Diffstat (limited to 'player/core.h')
-rw-r--r--player/core.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/player/core.h b/player/core.h
index c0b3e3d8e0..bf4b62fa56 100644
--- a/player/core.h
+++ b/player/core.h
@@ -589,6 +589,7 @@ void add_step_frame(struct MPContext *mpctx, int dir);
void queue_seek(struct MPContext *mpctx, enum seek_type type, double amount,
enum seek_precision exact, int flags);
double get_time_length(struct MPContext *mpctx);
+double get_start_time(struct MPContext *mpctx, int dir);
double get_current_time(struct MPContext *mpctx);
double get_playback_time(struct MPContext *mpctx);
int get_percent_pos(struct MPContext *mpctx);