Skip to content
Snippets Groups Projects
Commit 6eca96c6 authored by Mark Spencer's avatar Mark Spencer
Browse files

Fix wav append mode (bug #3498)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent a6783442
No related branches found
No related tags found
No related merge requests found
......@@ -855,8 +855,12 @@ struct ast_filestream *ast_writefile(const char *filename, const char *type, con
return NULL;
}
/* set the O_TRUNC flag if and only if there is no O_APPEND specified */
if (!(flags & O_APPEND))
if (flags & O_APPEND) {
/* We really can't use O_APPEND as it will break WAV header updates */
flags &= ~O_APPEND;
} else {
myflags = O_TRUNC;
}
myflags |= O_WRONLY | O_CREAT;
......
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