1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-22 07:46:55 +00:00
mpv/player
wm4 1a339fa09d video: actually wait for last frame being rendered on EOF
The video timing code could just decide that EOF was reached before it
was displayed. This is not really a problem for normal playback (if you
use something like --keep-open it'd show the last frame anyway,
otherwise it'd at best flash it on screen before destroying the window).
But in encode mode, it really matters, and makes the difference between
having one frame more or less in the output file.

Fix this by waiting for the VO before starting the real EOF.
vo_is_ready_for_frame() is normally used to determine when the VO frame
queue has enough space to send a new frame. Since the VO frame queue is
currently at most 1 frame, it being signaled means the remaining frame
was consumed and thus sent to the VO driver. If it returns false, it
will wake up the playloop as soon as the state changes.

I also considered using vo_still_displaying(), but it's not reliable,
because it checks the realtime of the frame end display time.
2018-05-03 01:08:44 +03:00
..
javascript js: use new hooks API (match f60826c3) 2018-04-07 16:02:20 -07:00
lua ytdl_hook: don't log error when loading is aborted 2018-04-15 21:07:13 +03:00
audio.c audio: fix EOF handling if there was no data at all 2018-04-20 12:34:43 +02:00
client.c client API: preparations for allowing render API to use DR etc. 2018-04-29 02:21:32 +03:00
client.h client API: preparations for allowing render API to use DR etc. 2018-04-29 02:21:32 +03:00
command.c command: change cycle-value command behavior 2018-04-29 02:21:32 +03:00
command.h player: fix hook processing consistency and code duplication issues 2018-03-26 23:06:50 -07:00
configfiles.c player: silence config file loading message on resuming 2018-01-13 03:26:45 -08:00
core.h player: remove in_dispatch field 2018-04-18 01:17:42 +03:00
external_files.c player: make track language matching case insensitive 2017-12-23 15:14:13 -07:00
external_files.h external_files: change license to LGPL 2017-06-20 14:22:10 +02:00
javascript.c js: use new hooks API (match f60826c3) 2018-04-07 16:02:20 -07:00
loadfile.c encode: rewrite half of it 2018-04-29 02:21:32 +03:00
lua.c client API: add a first class hook API, and deprecate old API 2018-03-26 23:02:23 -07:00
main.c encode: rewrite half of it 2018-04-29 02:21:32 +03:00
misc.c options: move most subtitle and OSD rendering options to sub structs 2018-01-02 14:27:37 -08:00
osd.c video: make decoder wrapper a filter 2018-01-30 03:10:27 -08:00
playloop.c player: remove in_dispatch field 2018-04-18 01:17:42 +03:00
screenshot.c vo_gpu: make screenshots use the GL renderer 2018-02-11 17:45:51 -08:00
screenshot.h player: make screenshot commands honor the async flag 2017-04-01 20:47:23 +02:00
scripting.c scripting: change when/how player waits for scripts being loaded 2018-04-18 01:17:41 +03:00
sub.c video: make decoder wrapper a filter 2018-01-30 03:10:27 -08:00
video.c video: actually wait for last frame being rendered on EOF 2018-05-03 01:08:44 +03:00