[vlc-commits] video_output: terminate the vout thread if stop was called during rendering
Steve Lhomme
git at videolan.org
Tue Jan 19 08:56:45 UTC 2021
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jan 19 09:32:47 2021 +0100| [ed4530e642af16da4fbd5dacac9577d04c1162f8] | committer: Steve Lhomme
video_output: terminate the vout thread if stop was called during rendering
As the termination may happen during ThreadDisplayPicture we also check if we
have to terminate the thread when it is done. We don't want to handle the
deadline and wait for nothing.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ed4530e642af16da4fbd5dacac9577d04c1162f8
---
src/video_output/video_output.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 46da5c8464..350a3e76c6 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1911,6 +1911,9 @@ static void *Thread(void *object)
wait = ThreadDisplayPicture(vout, &deadline) != VLC_SUCCESS;
+ if (atomic_load(&sys->control_is_terminated))
+ break;
+
const bool picture_interlaced = sys->displayed.is_interlaced;
vout_SetInterlacingState(&vout->obj, &sys->private, picture_interlaced);
More information about the vlc-commits
mailing list