0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 20:03:10 +02:00
mpv/TOOLS
wm4 68bbc55eda skip-logo.lua: fix skipping in the first two frames
mpv typically decodes and filters at least 2 frames before starting
playback. This happens during seeks, as well as when playback starts
from the beginning of the file.

skip-logo.lua receives notifications for all filtered frames, even
during seeking. It should interrupt during seeking, so as a crude
heuristic, it ignored all frames while the player was seeking. This does
not mean all these frames are skipped due to seeking (thus it's a "crude
hueristic"). In particular, it means that the first 2 frames of a video
cannot be skipped, since they're filtered within the playback restart
phase (equivalent to "seeking").

Fix this by making the heuristic slightly less crude. Since we observe
the property as "none", the property is not actually read until we do it
explicitly. By not reading it during seeking, we can let the frames
internally queue up (vf_fingerprint discards them in a ringbuffer-like
fashion if they're too many). Then, if seeking ends, we get the current
playback timestamp, and check queued up frames that are at or after that
timestamp. (In some ways, this duplicates what the player's seeking
logic does.)

A disadvantage is that this is racy. While playback-time is guaranteed
to be set when seeking changes from false to true, playback could
already have progressed to the next frame (or more) before the script
gets time to react. In theory, we could add a seek restart hook or so,
but I don't want to. A property that returns the last playback restart
time would also do it, but feels to special. Not an important problem
in practice anyway.
2019-10-08 21:26:43 +02:00
..
lua skip-logo.lua: fix skipping in the first two frames 2019-10-08 21:26:43 +02:00
mpv-osd-symbols.sfdir osd-font: make volume muted glyph slightly thicker 2017-04-22 18:03:16 +01:00
osxbundle/mpv.app/Contents osx: fix bundle on macOS High Sierra (10.13) 2017-10-03 11:30:56 +02:00
__init__.py build: use matroska.py & file2string.py as python modules 2017-01-05 11:25:18 +01:00
appveyor-build.sh appveyor: remove broken packages, install libplacebo 2019-07-03 17:30:50 +03:00
appveyor-install.sh appveyor: remove broken packages, install libplacebo 2019-07-03 17:30:50 +03:00
dylib-unhell.py osxbundle: remove rpath definitions towards dev tools 2019-09-22 17:07:51 +03:00
file2string.py TOOLS: change license of some scripts involved in build to LGPL 2017-06-24 10:08:33 +02:00
gen-osd-font.sh Add script to generate otf from sfdir using fontforge 2017-04-20 17:40:45 +01:00
idet.sh Use setfield, not --field-dominance. See #2297. 2015-09-09 02:57:44 +02:00
matroska.py TOOLS/matroska.py: ignore some unused elements 2018-04-29 02:21:32 +03:00
mpv_identify.sh mpv_identify: replace deprecated fps property 2017-06-25 14:24:49 +01:00
osxbundle.py osxbundle: print the output of the dylib-unhell call 2019-07-21 18:13:07 +03:00
stats-conv.py TOOLS/stats-conv.py: use different colors for symbols too 2016-10-06 19:42:18 +02:00
travis-deps travis: stop excluding ffmpeg-git 2017-12-22 21:49:21 +01:00
travis-rebuild-website TOOLS/travis-rebuild-website: update condition after docker transition 2019-07-30 20:12:33 +01:00
umpv TOOLS/umpv: fix typo in docstring 2015-04-17 13:37:47 +02:00
uncrustify.cfg uncrustify: add some instructions 2013-05-12 21:24:55 +02:00