comparison src/audio/SDL_audiocvt.c @ 2878:10c319ce07fb

Zero out SDL_AudioCVT struct before using it, to ensure it's all initialized.
author Ryan C. Gordon <icculus@icculus.org>
date Fri, 19 Dec 2008 06:01:03 +0000
parents 99210400e8b9
children 3ff86c46d324
comparison
equal deleted inserted replaced
2877:e2b1abe04641 2878:10c319ce07fb
1834 printf("Build format %04x->%04x, channels %u->%u, rate %d->%d\n", 1834 printf("Build format %04x->%04x, channels %u->%u, rate %d->%d\n",
1835 src_fmt, dst_fmt, src_channels, dst_channels, src_rate, dst_rate); 1835 src_fmt, dst_fmt, src_channels, dst_channels, src_rate, dst_rate);
1836 #endif 1836 #endif
1837 1837
1838 /* Start off with no conversion necessary */ 1838 /* Start off with no conversion necessary */
1839 1839 SDL_memset(cvt, '\0', sizeof (SDL_AudioCVT));
1840 cvt->src_format = src_fmt; 1840 cvt->src_format = src_fmt;
1841 cvt->dst_format = dst_fmt; 1841 cvt->dst_format = dst_fmt;
1842 cvt->needed = 0; 1842 cvt->needed = 0;
1843 cvt->filter_index = 0; 1843 cvt->filter_index = 0;
1844 cvt->filters[0] = NULL; 1844 cvt->filters[0] = NULL;