[vlc-commits] winstore: Gracefuly fail when no IAudioClient is provided
Hugo Beauzée-Luyssen
git at videolan.org
Wed Jan 28 12:27:46 CET 2015
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Jan 28 12:01:44 2015 +0100| [84ecfba8f2a84489986fc45bd5806d5274cd0c88] | committer: Hugo Beauzée-Luyssen
winstore: Gracefuly fail when no IAudioClient is provided
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=84ecfba8f2a84489986fc45bd5806d5274cd0c88
---
modules/audio_output/winstore.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/audio_output/winstore.c b/modules/audio_output/winstore.c
index 5d76900..6ae99ef 100644
--- a/modules/audio_output/winstore.c
+++ b/modules/audio_output/winstore.c
@@ -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;
More information about the vlc-commits
mailing list