[vlc-commits] video_output: explicitly check the VLC value from ThreadDisplayPreparePicture
Steve Lhomme
git at videolan.org
Tue Oct 20 11:03:01 CEST 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Oct 16 13:38:43 2020 +0200| [aab70bedf716796a5e1f3ec9c62a4f90a55fb889] | committer: Steve Lhomme
video_output: explicitly check the VLC value from ThreadDisplayPreparePicture
It doesn't return a boolean.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=aab70bedf716796a5e1f3ec9c62a4f90a55fb889
---
src/video_output/video_output.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 0f4e5c7992..62d87aa55a 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1484,13 +1484,17 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
*deadline = VLC_TICK_INVALID;
if (first)
- if (ThreadDisplayPreparePicture(vout, true, frame_by_frame, &paused)) /* FIXME not sure it is ok */
+ if (ThreadDisplayPreparePicture(vout, true, frame_by_frame, &paused) != VLC_SUCCESS) /* FIXME not sure it is ok */
return VLC_EGENERIC;
if (!paused || frame_by_frame)
- while (!sys->displayed.next
- && !ThreadDisplayPreparePicture(vout, false, frame_by_frame, &paused))
- ;
+ {
+ while (!sys->displayed.next)
+ {
+ if (ThreadDisplayPreparePicture(vout, false, frame_by_frame, &paused) != VLC_SUCCESS)
+ break;
+ }
+ }
const vlc_tick_t system_now = vlc_tick_now();
const vlc_tick_t render_delay = vout_chrono_GetHigh(&sys->render) + VOUT_MWAIT_TOLERANCE;
More information about the vlc-commits
mailing list