diff options
author | wm4 <wm4@nowhere> | 2019-10-06 22:20:10 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-10-06 23:31:58 +0200 |
commit | 4ad68d94523c3d101a5fd1d488a3d383a0a81587 (patch) | |
tree | 6721e6360daa590e501013cc356742c3e2288db0 /osdep/timer.h | |
parent | 9bc38bd18d23842909f4d7cdb97b32d4d6ac53ba (diff) | |
download | mpv-4ad68d94523c3d101a5fd1d488a3d383a0a81587.tar.bz2 mpv-4ad68d94523c3d101a5fd1d488a3d383a0a81587.tar.xz |
video: always decode 2 frames on playback restart
Unless --video-latency-hacks, always decode 2 frames on playback
restart. This in turn will always compute the correct frame duration
(even for the first frame), which in turn happens to fix that playback
with an image at the beginning breaks display.
If a still image precedes video, and the size/format of the frame is
different from that of the video following it, the incorrect frame
duration caused vo_reconfig2() to be called early, causing the window to
resize, and the renderer to clear the image to black. Specifically, it
hit the default value of 1 second duration (for still images), so the
image was displayed for 1 second, and changed to black until the next
proper video frame was displayed.
Normally this does not happen. Even if a video file displays still
images, it normally repeats the still image at the video's FPS (which is
sane). But you can construct such files, or use EDL to construct
something similarly behaving.
This change may increase seek latency a bit in audio video-sync mode
(the default). It needs to wait until 2 frames are decoded, before it
bothers to display the first frame. This is done even when seeking. In
theory it might be good to introduce a "seek preview" mode, which shows
the target image without all the preparations needed for starting
playback. (For example, it could not decode audio.) But since I'm using
video-sync=display-resample, which already needed to always decode 2
frames, I don't think this is a terribly high priority, nor do I
consider the slightly slower seeking a regression.
Fixes: #6765
Diffstat (limited to 'osdep/timer.h')
0 files changed, 0 insertions, 0 deletions