<html><head></head><body>Same as v1.<br><br>-1<br><br><div class="gmail_quote">Le 11 février 2021 10:34:03 GMT+02:00, Alexandre Janniaux <ajanni@videolabs.io> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Some display are doing IO (eg. texture synchronization, WSI details) and<br>might be waiting within the prepare/display code. Install an<br>interruption context to allow notifying them that we're gonna kill them.<hr> src/video_output/video_output.c | 14 ++++++++++++++<br> 1 file changed, 14 insertions(+)<br><br>diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c<br>index d04d3f4d11..d1eaf81242 100644<br>--- a/src/video_output/video_output.c<br>+++ b/src/video_output/video_output.c<br>@@ -49,6 +49,7 @@<br> #include <vlc_plugin.h><br> #include <vlc_codec.h><br> #include <vlc_atomic.h><br>+#include <vlc_interrupt.h><br> <br> #include <libvlc.h><br> #include "vout_private.h"<br>@@ -162,6 +163,7 @@ typedef struct vout_thread_sys_t<br> vout_chrono_t render; /**< picture render time estimator */<br> vout_chrono_t static_filter;<br> <br>+ vlc_interrupt_t *interrupt;<br> vlc_atomic_rc_t rc;<br> <br> } vout_thread_sys_t;<br>@@ -1763,6 +1765,8 @@ static void *Thread(void *object)<br> vlc_tick_t deadline = VLC_TICK_INVALID;<br> bool wait = false;<br> <br>+ vlc_interrupt_set(sys->interrupt);<br>+<br> for (;;) {<br> if (wait)<br> {<br>@@ -1848,9 +1852,11 @@ void vout_StopDisplay(vout_thread_t *vout)<br> vout_thread_sys_t *sys = VOUT_THREAD_TO_SYS(vout);<br> <br> atomic_store(&sys->control_is_terminated, true);<br>+ vlc_interrupt_kill(sys->interrupt);<br> // wake up so it goes back to the loop that will detect the terminated state<br> vout_control_Wake(&sys->control);<br> vlc_join(sys->thread, NULL);<br>+ vlc_interrupt_destroy(sys->interrupt);<br> <br> vout_ReleaseDisplay(sys);<br> }<br>@@ -2147,6 +2153,14 @@ int vout_Request(const vout_configuration_t *cfg, vlc_video_context *vctx, input<br> <br> if (sys->display != NULL)<br> vout_StopDisplay(cfg->vout);<br>+ sys->interrupt = vlc_interrupt_create();<br>+ if (sys->interrupt == NULL)<br>+ {<br>+ video_format_Clean(&original);<br>+ vout_DisableWindow(vout);<br>+ return -1;<br>+ }<br>+<br> <br> vout_ReinitInterlacingSupport(cfg->vout, &sys->private);<br> </pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>