mpv/player
wm4 efe43d768f 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
2020-02-28 02:14:12 +01:00
..
javascript js: require: directory-scripts: first look at <dir>/modules/ 2020-02-07 18:22:12 +02:00
lua ytdl_hook: fix URL extraction for manifests 2020-02-23 12:04:55 +01:00
audio.c audio: remove outdated comment 2020-02-19 14:50:54 +01:00
client.c ta: remove two pointless wrappers 2020-02-23 19:48:25 +01:00
client.h scripting: load scripts from directories 2020-02-01 18:09:40 +01:00
command.c player: set playback_pts in hr-seek past EOF case 2020-02-28 02:14:12 +01:00
command.h command, vo: add a mechanism for runtime DPI scale changes 2020-01-09 19:13:42 +01:00
configfiles.c player: fix minor coding style issue 2020-01-26 14:29:48 +01:00
core.h player: set playback_pts in hr-seek past EOF case 2020-02-28 02:14:12 +01:00
external_files.c
external_files.h
javascript.c js: require: directory-scripts: first look at <dir>/modules/ 2020-02-07 18:22:12 +02:00
loadfile.c player: set playback_pts in hr-seek past EOF case 2020-02-28 02:14:12 +01:00
lua.c lua: fix typo in comment 2020-02-06 23:02:23 +01:00
main.c player: make failure to load scripts non-fatal again 2020-01-20 19:58:51 +01:00
misc.c player: add ab-loop-count option/property 2020-02-08 15:01:33 +01:00
osd.c player: format low cache duration with more decimals 2019-10-11 19:18:43 +02:00
playloop.c player: set playback_pts in hr-seek past EOF case 2020-02-28 02:14:12 +01:00
screenshot.c screenshot: fix typo in comment 2020-02-07 13:42:42 +01:00
screenshot.h player: make screenshot each-frame mode more accurate 2020-02-07 13:32:21 +01:00
scripting.c scripting: fix racy crash if loading .run files fails 2020-02-25 22:41:09 +01:00
sub.c player: partially fix backward playback display of cached text subtitles 2020-02-04 20:26:35 +01:00
video.c player: set playback_pts in hr-seek past EOF case 2020-02-28 02:14:12 +01:00