Skip to content
Snippets Groups Projects
Commit 70003ebd authored by Michael Smith's avatar Michael Smith
Browse files

Patches from Stan Seibert for memleaks and for decode on big-endian machines.

git-svn-id: http://svn.xiph.org/trunk/ao@1383 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent 1230469d
No related branches found
No related tags found
No related merge requests found
......@@ -221,7 +221,7 @@ static void ao_wav_play(ao_internal_t *state, void *output_samples, uint_32 num_
/* Swap the bytes into the swap buffer (so we don't
mess up the output_samples buffer) */
for(i = 0; i < num_bytes/2; i+=2) {
for(i = 0; i < num_bytes; i+=2) {
s->swap_buffer[i] = ((char *) output_samples)[i+1];
s->swap_buffer[i+1] = ((char *) output_samples)[i];
}
......@@ -297,6 +297,9 @@ static void ao_wav_close(ao_internal_t *state)
ERR:
close(s->fd);
free(s->output_file);
if (s->byte_swap)
free(s->swap_buffer);
free(s);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment