diff options
author | wm4 <wm4@nowhere> | 2019-05-25 23:04:26 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-09-19 20:37:04 +0200 |
commit | f68d9e75f8957957a9b97e2883a9482fd0b6479a (patch) | |
tree | 4095db677b6ff79d94d8f8ed3a09481a04bbc22e /player/video.c | |
parent | aebccb880107c6c6db21853446300c9deee718b3 (diff) | |
download | mpv-f68d9e75f8957957a9b97e2883a9482fd0b6479a.tar.bz2 mpv-f68d9e75f8957957a9b97e2883a9482fd0b6479a.tar.xz |
player: fix --end for backwards playback
We need to transform the timestamp returned by get_play_end_pts().
I considered making it return the transformed timestamp directly. There
are 4 callers; 2 need a transformed timestamps, 2 don't. So I guess it
doesn't matter.
Diffstat (limited to 'player/video.c')
-rw-r--r-- | player/video.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/player/video.c b/player/video.c index 4d8d5d0260..dd48e0a529 100644 --- a/player/video.c +++ b/player/video.c @@ -483,6 +483,8 @@ static int video_output_image(struct MPContext *mpctx) } if (img) { double endpts = get_play_end_pts(mpctx); + if (endpts != MP_NOPTS_VALUE) + endpts *= mpctx->play_dir; if ((endpts != MP_NOPTS_VALUE && img->pts >= endpts) || mpctx->max_frames == 0) { |