1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 17:12:36 +00:00
mpv/video/decode
wm4 227d087db6 video: display last frame, drain frames on video reconfig
Until now, the player didn't care to drain frames on video reconfig.
Instead, the VO was reconfigured (i.e. resized) before the queued frames
finished displaying. This can for example be observed by passing
multiple images with different size as mf:// filename. Then the window
would resize one frame before image with the new size is displayed. With
--vo=vdpau, the effect is worse, because this VO queues more than 1
frame internally.

Fix this by explicitly draining buffered frames before video reconfig.

Raise the display time of the last frame. Otherwise, the last frame
would be shown for a very short time only. This usually doesn't matter,
but helps when playing image files. This is a byproduct of frame
draining, because normally, video timing is based on the frames queued
to the VO, and we can't do that with frames of different size or format.
So we pretend that the frame before the change is the last frame in
order to time it. This code is incorrect though: it tries to use the
framerate, which often doesn't make sense. But it's good enough to test
this code with mf://.
2013-12-10 20:07:39 +01:00
..
dec_video.c video: display last frame, drain frames on video reconfig 2013-12-10 20:07:39 +01:00
dec_video.h video: display last frame, drain frames on video reconfig 2013-12-10 20:07:39 +01:00
lavc_dr1.c build: make pthreads mandatory 2013-11-28 19:28:38 +01:00
lavc.h video: move video filter chain initialization from decoder to player 2013-12-10 20:07:39 +01:00
vaapi.c vaapi: remove unused hw image formats, simplify 2013-11-29 14:19:29 +01:00
vd_lavc.c video: move video filter chain initialization from decoder to player 2013-12-10 20:07:39 +01:00
vd.h video: move video filter chain initialization from decoder to player 2013-12-10 20:07:39 +01:00
vda.c vo_opengl: support for vda hardware decoding 2013-12-02 09:03:31 +01:00
vdpau_old.c vdpau: always let decoder output IMGFMT_VDPAU 2013-11-29 14:19:44 +01:00
vdpau.c video: move struct mp_hwdec_info into its own header file 2013-11-23 21:26:31 +01:00