Commit 9a826c9f authored by Steve Lhomme's avatar Steve Lhomme Committed by Hugo Beauzée-Luyssen

audio_output:wasapi: make sure pwf_mix is initialized when we call CoTaskMemFree()

Signed-off-by: default avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent 4f38f4d7
......@@ -463,15 +463,6 @@ static HRESULT Restart(aout_stream_t *s, audio_sample_format_t *restrict pfmt,
return E_OUTOFMEMORY;
sys->client = NULL;
void *pv;
HRESULT hr = aout_stream_Activate(s, &IID_IAudioClient, NULL, &pv);
if (FAILED(hr))
{
msg_Err(s, "cannot activate client (error 0x%lx)", hr);
goto error;
}
sys->client = pv;
/* Configure audio stream */
WAVEFORMATEXTENSIBLE_IEC61937 wf_iec61937;
WAVEFORMATEXTENSIBLE *pwfe = &wf_iec61937.FormatExt;
......@@ -482,6 +473,15 @@ static HRESULT Restart(aout_stream_t *s, audio_sample_format_t *restrict pfmt,
bool b_spdif = AOUT_FMT_SPDIF(&fmt);
bool b_hdmi = AOUT_FMT_HDMI(&fmt);
void *pv;
HRESULT hr = aout_stream_Activate(s, &IID_IAudioClient, NULL, &pv);
if (FAILED(hr))
{
msg_Err(s, "cannot activate client (error 0x%lx)", hr);
goto error;
}
sys->client = pv;
if (b_spdif && !b_hdmi && fmt.i_format == VLC_CODEC_DTS && !force_dts_spdif
&& fmt.i_rate >= 48000)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment