From d0bf92a9c3196b89c4bda73cdfd4d13bd2b40468 Mon Sep 17 00:00:00 2001 From: Henrik Andersson Date: Fri, 22 Mar 2013 12:47:03 +0000 Subject: [PATCH] Zero out format struct before use. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1704 423420c4-83ab-492f-b58f-81f9feb106b5 --- rdpsnd_libao.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rdpsnd_libao.c b/rdpsnd_libao.c index a43079d..ee5bac0 100644 --- a/rdpsnd_libao.c +++ b/rdpsnd_libao.c @@ -4,6 +4,7 @@ Copyright (C) Matthew Chapman 2003-2008 Copyright (C) GuoJunBo 2003 Copyright (C) Michael Gernoth 2005-2008 + Copyright (C) 2013 Henrik Andersson This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -71,12 +72,12 @@ libao_open(void) default_driver = ao_default_driver_id(); } + memset(&format, 0, sizeof(format)); format.bits = 16; format.channels = 2; format.rate = 44100; format.byte_format = AO_FMT_NATIVE; - o_device = ao_open_live(default_driver, &format, NULL); if (o_device == NULL) {