<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div><br></div>
<div><br></div>
<div><br></div>
<div>On Thu, Jul 6, 2017, at 12:25, Rémi Denis-Courmont wrote:<br></div>
<blockquote type="cite"><div defang_data-gmailquote="yes"><div>Le 6 juillet 2017 12:25:01 GMT+03:00, Thomas Guillem <thomas@gllm.fr> a écrit :<br></div>
<blockquote defang_data-gmailquote="yes" style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204, 204, 204);padding-left:1ex;"><pre><div>---<br></div>
<div> modules/audio_output/mmdevice.c | 12 +++++++++---<br></div>
<div> 1 file changed, 9 insertions(+), 3 deletions(-)<br></div>
<div><br></div>
<div>diff --git a/modules/audio_output/mmdevice.c b/modules/audio_output/mmdevice.c<br></div>
<div>index 194a8bf91b..772fb48565 100644<br></div>
<div>--- a/modules/audio_output/mmdevice.c<br></div>
<div>+++ b/modules/audio_output/mmdevice.c<br></div>
<div>@@ -1087,9 +1087,6 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)<br></div>
<div> {<br></div>
<div>     aout_sys_t *sys = aout->sys;<br></div>
<div> <br></div>
<div>-    if (sys->dev == NULL)<br></div>
<div>-        return -1;<br></div>
<div>-<br></div>
<div>     aout_stream_t *s = vlc_object_create(aout, sizeof (*s));<br></div>
<div>     if (unlikely(s == NULL))<br></div>
<div>         return -1;<br></div>
<div>@@ -1098,6 +1095,15 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)<br></div>
<div> <br></div>
<div>     EnterMTA();<br></div>
<div>     EnterCriticalSection(&sys->lock);<br></div>
<div>+<br></div>
<div>+    if (sys->dev == NULL)<br></div>
<div>+    {<br></div>
<div>+        vlc_object_release(s);<br></div>
<div>+        LeaveCriticalSection(&sys->lock);<br></div>
<div>+        LeaveMTA();<br></div>
<div>+        return -1;<br></div>
<div>+    }<br></div>
<div>+<br></div>
<div>     for (;;)<br></div>
<div>     {<br></div>
<div>         HRESULT hr;<br></div>
</pre></blockquote></div>
<div><br></div>
<div>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></div>
</blockquote><div><br></div>
<div>Ah yes, sys->dev is set from Open() and won't change if DeviceSelect() is not called.<br></div>
<div><br></div>
<blockquote type="cite"><div> -- <br></div>
<div> Rémi Denis-Courmont<br></div>
<div> Typed on an inconvenient virtual keyboard <br></div>
<div><u>_______________________________________________</u><br></div>
<div>vlc-devel mailing list<br></div>
<div>To unsubscribe or modify your subscription options:<br></div>
<div><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div>
</blockquote><div><br></div>
</body>
</html>