diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2008-04-03 07:49:05 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2008-04-03 07:49:05 +0000 |
commit | 0e6140c564e8c1376a1a069f8d6d1338e019e6ea (patch) | |
tree | b0fefba24c2a34bdde2fdd9b0d52a113371a25ed /formats | |
parent | cbf80c1a3c6c0aa0ad6b9b7bdf4862f1cf3141d6 (diff) |
Use a 32k file buffer on recordings, which increases the efficiency of file recording.
(closes issue #11962)
Reported by: garlew
Patches:
recording.patch uploaded by garlew (license 376)
bug-11962.diff uploaded by snuffy (license 35)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'formats')
-rw-r--r-- | formats/format_wav.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/formats/format_wav.c b/formats/format_wav.c index 2a40dedbd..bbeb20baf 100644 --- a/formats/format_wav.c +++ b/formats/format_wav.c @@ -328,6 +328,11 @@ static void wav_close(struct ast_filestream *s) { char zero = 0; struct wav_desc *fs = (struct wav_desc *)s->_private; + + if (s->filename) { + update_header(s->f); + } + /* Pad to even length */ if (fs->bytes & 0x1) fwrite(&zero, 1, 1, s->f); @@ -416,7 +421,6 @@ static int wav_write(struct ast_filestream *fs, struct ast_frame *f) } s->bytes += f->datalen; - update_header(fs->f); return 0; |