Fix wave file lengths (bug #2486)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-10-09 14:55:14 +00:00
parent 37f4e037c5
commit 07d1b22e81

View File

@@ -219,7 +219,7 @@ static int update_header(int fd)
end = lseek(fd, 0, SEEK_END);
/* in a gsm WAV, data starts 60 bytes in */
bytes = end - 60;
datalen = htoll(bytes);
datalen = htoll((bytes + 1) & ~0x1);
filelen = htoll(52 + ((bytes + 1) & ~0x1));
if (cur < 0) {
ast_log(LOG_WARNING, "Unable to find our position\n");