vlc | branch: master | Steve Lhomme <[email protected]> | Wed Nov 18 09:11:23 2020 +0100| [8603bfbf110b6899e37b3868b3374576b43f764b] | committer: Steve Lhomme
video_output: move the first picture reading in frame by frame/regular code In frame by frame we already read the picture to put it in displayed.current no matter what. But it was actually doing it twice for the first picture, possibly missing the first picture. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8603bfbf110b6899e37b3868b3374576b43f764b --- src/video_output/video_output.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c index 7e9874309d..1dec6e13d6 100644 --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c @@ -1468,19 +1468,11 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline) if (deadline) *deadline = VLC_TICK_INVALID; - if (!sys->displayed.current) - { - sys->displayed.current = - ThreadDisplayPreparePicture(vout, true, frame_by_frame, &paused); - if (!sys->displayed.current) - return VLC_EGENERIC; // wait with no known deadline - } - bool render_now; if (frame_by_frame) { picture_t *next; - next = ThreadDisplayPreparePicture(vout, false, true, &paused); + next = ThreadDisplayPreparePicture(vout, first, true, &paused); if (next == NULL) return VLC_EGENERIC; @@ -1492,6 +1484,14 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline) } else { + if (first) + { + sys->displayed.current = + ThreadDisplayPreparePicture(vout, first, false, &paused); + if (!sys->displayed.current) + return VLC_EGENERIC; // wait with no known deadline + } + const vlc_tick_t system_now = vlc_tick_now(); const vlc_tick_t render_delay = vout_chrono_GetHigh(&sys->render) + VOUT_MWAIT_TOLERANCE; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
