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