diff options
author | wm4 <wm4@nowhere> | 2020-02-28 01:37:41 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-02-28 02:14:12 +0100 |
commit | efe43d768fa4dd13329dfa69831aedbdff948718 (patch) | |
tree | 2b732385c9ffcd037fdbee6ea5b25416dd590000 /common/playlist.h | |
parent | 009d1ffda6cc5438d7287b2971d17e866ebc86c0 (diff) | |
download | mpv-efe43d768fa4dd13329dfa69831aedbdff948718.tar.bz2 mpv-efe43d768fa4dd13329dfa69831aedbdff948718.tar.xz |
player: set playback_pts in hr-seek past EOF case
Hr-seek past the last frame instantly enters EOF, which means
handle_playback_time() will not set playback_pts to the video PTS (as
all video frames are skipped), which leads to the playback time being
taken from the last seek target. This results in confusing behavior,
especially since the seek time will be clipped to the file duration for
display, but not for further relative seeks.
Obviously, the time should be set to the last video frame, so use the
last video frame as fallback if both audio and video have ended. Also,
since the same problem exists with audio-only playback, add a fallback
for audio PTS too. We don't know which was the "last" fragment of media
played (to decide whether to use the audio or video PTS as the
fallback), but it doesn't matter since the maximum works.
This could lead to some undesired effects. In particular the audio PTS
is basically a bad guess, and is for example not clipped against --end.
(But the ridiculous way audio syncing and clamping currently works, I'm
not going to touch that shit unless I rewrite it completely.) The cover
art case is slightly broken: using --keep-open with keyframe seeks will
result in 0 as playback PTS (the video PTS). OK, who cares, it got late.
Also casually get rid of last_vo_pts, since that barely made any sense
at all.
Fixes: #7487
Diffstat (limited to 'common/playlist.h')
0 files changed, 0 insertions, 0 deletions