[vlc-devel] [PATCH] video_output: explicit vlc_testcancel

quentin.chateau at deepskycorp.com quentin.chateau at deepskycorp.com
Tue Feb 25 12:47:19 CET 2020


From: Quentin Chateau <quentin.chateau at deepskycorp.com>

When ThreadDisplayPicture does not return VLC_SUCCESS,
explicitely check for thread cancellation.

There are cases where a video filter can fail
systematically without hitting any cancellation point
after the video output thread is cancelled, resulting
in an infinite loop if there is no explicit check.
---
 src/video_output/video_output.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 229b010a96..f7aac554e4 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1703,6 +1703,7 @@ noreturn static void *Thread(void *object)
 
         if (wait)
         {
+            vlc_testcancel();
             const vlc_tick_t max_deadline = vlc_tick_now() + VLC_TICK_FROM_MS(100);
             deadline = deadline == VLC_TICK_INVALID ? max_deadline : __MIN(deadline, max_deadline);
         } else {
-- 
2.17.1



More information about the vlc-devel mailing list