Clear SF_INFO struct before calling sf_open().

According to the docs only format needs to be set to zero, but let's
just zero it entirely.
This commit is contained in:
Kim Woelders 2013-06-09 20:35:47 +02:00
parent 1316cfb15a
commit ceabc2e96d
1 changed files with 1 additions and 0 deletions

View File

@ -86,6 +86,7 @@ SoundSampleGetData(const char *file, SoundSampleData * ssd)
SF_INFO sf_info;
int bytes_per_frame, frame_count, frames_read;
memset(&sf_info, 0, sizeof(sf_info));
sf = sf_open(file, SFM_READ, &sf_info);
if (!sf)
return -1;