vlc | branch: master | Steve Lhomme <[email protected]> | Thu Jan 21 10:32:40 2021 +0100| [8094e821e8feb5d16372b9fcae8d8d7dceecf4e5] | committer: Steve Lhomme
video_output: rework the frame by frame mode picture picking We only update the displayed.current if there is a next picture to use. If there was a remaining displayed.next picture we use that as the next picture. We no longer lose the displayed.current if there is no next picture yet. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8094e821e8feb5d16372b9fcae8d8d7dceecf4e5 --- src/video_output/video_output.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c index a2d2519450..c0bcb89ba8 100644 --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c @@ -1484,25 +1484,25 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline) bool render_now; if (frame_by_frame) { - if (!sys->displayed.current) + picture_t *next; + if (likely(!sys->displayed.next)) { - assert(!sys->displayed.next); - sys->displayed.current = - ThreadDisplayPreparePicture(vout, true, true, &paused); - if (!sys->displayed.current) - return VLC_EGENERIC; // wait with no known deadline + next = + ThreadDisplayPreparePicture(vout, !sys->displayed.current, true, &paused); } - - if (!sys->displayed.next) + else { - sys->displayed.next = - ThreadDisplayPreparePicture(vout, false, true, &paused); + // remaining from normal playback + next = sys->displayed.next; + sys->displayed.next = NULL; } - if (likely(sys->displayed.current != NULL)) - picture_Release(sys->displayed.current); - sys->displayed.current = sys->displayed.next; - sys->displayed.next = NULL; + if (next) + { + if (likely(sys->displayed.current != NULL)) + picture_Release(sys->displayed.current); + sys->displayed.current = next; + } if (!sys->displayed.current) return VLC_EGENERIC; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
