Skip to content

Commit

Permalink
winstore: Gracefuly fail when no IAudioClient is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
chouquette committed Jan 28, 2015
1 parent 3a6305c commit 84ecfba
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions modules/audio_output/winstore.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 84ecfba

Please sign in to comment.