mpv/player
wm4 4ad68d9452 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
2019-10-06 23:31:58 +02:00
..
javascript js: expose mpv_abort_async_command() (match dbe831bd) 2019-09-11 21:08:04 +03:00
lua player: update for --video-aspect deprecation 2019-10-04 22:41:31 +02:00
audio.c audio: raise log level of playback reset on audio timestamp 2019-10-06 20:46:22 +02:00
client.c client API: add mpv_command_ret 2019-09-21 14:24:42 +02:00
client.h render api: fix use-after-free 2019-09-20 13:54:17 +02:00
command.c options: rename --video-aspect to --video-aspect-override 2019-10-04 21:34:22 +02:00
command.h demux, command: add a third stream recording mechanism 2019-09-19 20:37:05 +02:00
configfiles.c player: update for --video-aspect deprecation 2019-10-04 22:41:31 +02:00
core.h loadfile: don't always accidentally always prefetching 2019-09-29 02:24:29 +02:00
external_files.c external_files: add .lrc subtitle extension 2019-09-02 01:25:43 +03:00
external_files.h player: get rid of mpv_global.opts 2018-05-24 19:56:35 +02:00
javascript.c js: expose mpv_abort_async_command() (match dbe831bd) 2019-09-11 21:08:04 +03:00
loadfile.c player: don't load external files when reading from stdin 2019-10-06 21:35:15 +02:00
lua.c lua: expose mpv_abort_async_command() 2018-05-24 19:56:34 +02:00
main.c player: "subprocess" command should stop immediately in idle mode 2019-10-04 16:30:48 +02:00
misc.c player: fix --loop with backward playback 2019-09-19 20:37:05 +02:00
osd.c osd: allow sub-text to work even if sub-visibility is disabled 2019-09-21 15:36:58 +02:00
playloop.c playloop: don't read playback pos from byte stream 2019-09-21 15:49:28 +00:00
screenshot.c screenshot: move message showing to common code 2019-09-19 20:37:05 +02:00
screenshot.h image_writer: move convert_image() to player/screenshot.c 2019-09-14 23:02:39 +02:00
scripting.c scripting: change when/how player waits for scripts being loaded 2018-04-18 01:17:41 +03:00
sub.c player: ensure backward playback state is propagated on track switching 2019-09-19 20:37:05 +02:00
video.c video: always decode 2 frames on playback restart 2019-10-06 23:31:58 +02:00