[vlc-commits] video_output: don't use displayed.next in frame by frame mode
Steve Lhomme
git at videolan.org
Fri Nov 13 16:52:44 CET 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Nov 10 10:26:05 2020 +0100| [42011517f39c284620009dbfaca0e2d3da949585] | committer: Steve Lhomme
video_output: don't use displayed.next in frame by frame mode
We don't need to set the variable temporarily to reset it a few lines later.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=42011517f39c284620009dbfaca0e2d3da949585
---
src/video_output/video_output.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index e43d537781..62c9e854fc 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1487,16 +1487,16 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
bool render_now;
if (frame_by_frame)
{
- if (!sys->displayed.next)
- {
- sys->displayed.next =
+ picture_Release(sys->displayed.current);
+ if (likely(sys->displayed.next == NULL))
+ sys->displayed.current =
ThreadDisplayPreparePicture(vout, false, true, &paused);
+ else
+ {
+ sys->displayed.current = sys->displayed.next;
+ sys->displayed.next = NULL;
}
- picture_Release(sys->displayed.current);
- sys->displayed.current = sys->displayed.next;
- sys->displayed.next = NULL;
-
render_now = true;
}
else
More information about the vlc-commits
mailing list