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
This commit is contained in:
Henrik Andersson 2013-03-22 12:47:03 +00:00
parent 70d8c071c1
commit d0bf92a9c3

View File

@ -4,6 +4,7 @@
Copyright (C) Matthew Chapman <matthewc.unsw.edu.au> 2003-2008 Copyright (C) Matthew Chapman <matthewc.unsw.edu.au> 2003-2008
Copyright (C) GuoJunBo <guojunbo@ict.ac.cn> 2003 Copyright (C) GuoJunBo <guojunbo@ict.ac.cn> 2003
Copyright (C) Michael Gernoth <mike@zerfleddert.de> 2005-2008 Copyright (C) Michael Gernoth <mike@zerfleddert.de> 2005-2008
Copyright (C) 2013 Henrik Andersson
This program is free software: you can redistribute it and/or modify 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 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(); default_driver = ao_default_driver_id();
} }
memset(&format, 0, sizeof(format));
format.bits = 16; format.bits = 16;
format.channels = 2; format.channels = 2;
format.rate = 44100; format.rate = 44100;
format.byte_format = AO_FMT_NATIVE; format.byte_format = AO_FMT_NATIVE;
o_device = ao_open_live(default_driver, &format, NULL); o_device = ao_open_live(default_driver, &format, NULL);
if (o_device == NULL) if (o_device == NULL)
{ {