Commit 84ecfba8 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

winstore: Gracefuly fail when no IAudioClient is provided

parent 3a6305ca
......@@ -172,14 +172,17 @@ static int Open(vlc_object_t *obj)
{
audio_output_t *aout = (audio_output_t *)obj;
IAudioClient* client = var_InheritInteger(aout, "winstore-audioclient");
if (client == NULL)
return VLC_EGENERIC;
aout_sys_t *sys = malloc(sizeof (*sys));
if (unlikely(sys == NULL))
return VLC_ENOMEM;
aout->sys = sys;
sys->stream = NULL;
sys->client = var_InheritInteger(aout, "winstore-audioclient");
assert(sys->client != NULL);
sys->client = client;
aout->start = Start;
aout->stop = Stop;
aout->time_get = TimeGet;
......
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