[vlc-devel] [PATCH 07/16] video_output: explicitly check the VLC value from ThreadDisplayPreparePicture
Steve Lhomme
robux4 at ycbcr.xyz
Fri Oct 16 16:26:38 CEST 2020
It doesn't return a boolean.
---
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 0f4e5c79929..62d87aa55ab 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;
--
2.26.2
More information about the vlc-devel
mailing list