<html><head></head><body><div class="gmail_quote">Le 6 juillet 2017 12:25:01 GMT+03:00, Thomas Guillem <thomas@gllm.fr> 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">---<br /> modules/audio_output/mmdevice.c | 12 +++++++++---<br /> 1 file changed, 9 insertions(+), 3 deletions(-)<br /><br />diff --git a/modules/audio_output/mmdevice.c b/modules/audio_output/mmdevice.c<br />index 194a8bf91b..772fb48565 100644<br />--- a/modules/audio_output/mmdevice.c<br />+++ b/modules/audio_output/mmdevice.c<br />@@ -1087,9 +1087,6 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)<br /> {<br /> aout_sys_t *sys = aout->sys;<br /> <br />- if (sys->dev == NULL)<br />- return -1;<br />-<br /> aout_stream_t *s = vlc_object_create(aout, sizeof (*s));<br /> if (unlikely(s == NULL))<br /> return -1;<br />@@ -1098,6 +1095,15 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)<br /> <br /> EnterMTA();<br /> EnterCriticalSection(&sys->lock);<br />+<br />+ if (sys->dev == NULL)<br />+ {<br />+ vlc_object_release(s);<br />+ LeaveCriticalSection(&sys->lock);<br />+ LeaveMTA();<br />+ return -1;<br />+ }<br />+<br /> for (;;)<br /> {<br /> HRESULT hr;</pre></blockquote></div><br clear="all">No, I don't think so. I can't see how sys->dev can change there. And if it did, this patch would not be sufficient AFAICT.<br>
-- <br>
Rémi Denis-Courmont<br>
Typed on an inconvenient virtual keyboard</body></html>