Fix ADPCM file writing

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer 2003-09-21 02:59:26 +00:00
parent 27294b83d2
commit 27787e21ec
1 changed files with 1 additions and 1 deletions

View File

@ -274,7 +274,7 @@ static int vox_write(struct ast_filestream *fs, struct ast_frame *f)
ast_log(LOG_WARNING, "Invalid frame of data (< 3 bytes long) from %s\n", f->src);
return -1;
}
if ((res = write(fs->fd, f->data + 3, f->datalen)) != f->datalen) {
if ((res = write(fs->fd, f->data + 3, f->datalen - 3)) != f->datalen - 3) {
ast_log(LOG_WARNING, "Bad write (%d/%d): %s\n", res, f->datalen, strerror(errno));
return -1;
}