mirror of https://github.com/mpv-player/mpv
68bbc55eda
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. |
||
---|---|---|
.. | ||
lua | ||
mpv-osd-symbols.sfdir | ||
osxbundle/mpv.app/Contents | ||
__init__.py | ||
appveyor-build.sh | ||
appveyor-install.sh | ||
dylib-unhell.py | ||
file2string.py | ||
gen-osd-font.sh | ||
idet.sh | ||
matroska.py | ||
mpv_identify.sh | ||
osxbundle.py | ||
stats-conv.py | ||
travis-deps | ||
travis-rebuild-website | ||
umpv | ||
uncrustify.cfg |