diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-22 16:30:25 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-22 16:30:25 +0000 |
commit | 664e8fdabed38afdcb2dbe0992755c029d53bd54 (patch) | |
tree | 7471cf37834cc03bc1ec445f21c8882e2148d1dc /include/asterisk/file.h | |
parent | e9c0728811093ce23809fe95b6efdc90a2c12e22 (diff) |
When merging the fix for issue #14118, I found that
the issue didn't affect 1.6.0, but in this case that's
not an especially good thing, because it means that
the fix for issue #13496 was not merged into 1.6.0 in
the first place. This commit kills two birds with one
stone by putting both fixes in the 1.6.0 branch
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@166278 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/file.h')
-rw-r--r-- | include/asterisk/file.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/asterisk/file.h b/include/asterisk/file.h index 0f33b5340..ed75c1f9b 100644 --- a/include/asterisk/file.h +++ b/include/asterisk/file.h @@ -315,6 +315,21 @@ off_t ast_tellstream(struct ast_filestream *fs); */ struct ast_frame *ast_readframe(struct ast_filestream *s); +/*!\brief destroy a filestream using an ast_frame as input + * + * This is a hack that is used also by the ast_trans_pvt and + * ast_dsp structures. When a structure contains an ast_frame + * pointer as one of its fields. It may be that the frame is + * still used after the outer structure is freed. This leads to + * invalid memory accesses. This function allows for us to hold + * off on destroying the ast_filestream until we are done using + * the ast_frame pointer that is part of it + * + * \param fr The ast_frame that is part of an ast_filestream we wish + * to free. + */ +void ast_filestream_frame_freed(struct ast_frame *fr); + #if defined(__cplusplus) || defined(c_plusplus) } #endif |