diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-20 18:20:39 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-20 18:20:39 +0000 |
commit | 319c28addab3857ac3e71bd8eee0576e4ad6fea4 (patch) | |
tree | b2955b469882f04e0ec301bf3cb8fa0c0a348c9a /include | |
parent | 0ae1e2c5118f3f315175015c03cf9767459c735b (diff) |
Merged revisions 158133 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r158133 | mmichelson | 2008-11-20 12:20:00 -0600 (Thu, 20 Nov 2008) | 10 lines
Merged revisions 158072 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r158072 | twilson | 2008-11-20 11:48:58 -0600 (Thu, 20 Nov 2008) | 2 lines
Begin on a crusade to end trailing whitespace!
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@158134 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/file.h | 25 | ||||
-rw-r--r-- | include/asterisk/frame.h | 4 |
2 files changed, 29 insertions, 0 deletions
diff --git a/include/asterisk/file.h b/include/asterisk/file.h index 0f33b5340..e1dd99e26 100644 --- a/include/asterisk/file.h +++ b/include/asterisk/file.h @@ -315,6 +315,31 @@ 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); + +/*! Initialize file stuff */ +/*! + * Initializes all the various file stuff. Basically just registers the cli stuff + * Returns 0 all the time + */ +int ast_file_init(void); + + +#define AST_RESERVED_POINTERS 20 + #if defined(__cplusplus) || defined(c_plusplus) } #endif diff --git a/include/asterisk/frame.h b/include/asterisk/frame.h index 96a9ca8e7..267a820e8 100644 --- a/include/asterisk/frame.h +++ b/include/asterisk/frame.h @@ -134,6 +134,10 @@ enum { * The dsp cannot be free'd if the frame inside of it still has * this flag set. */ AST_FRFLAG_FROM_DSP = (1 << 2), + /*! This frame came from a filestream and is still the original frame. + * The filestream cannot be free'd if the frame inside of it still has + * this flag set. */ + AST_FRFLAG_FROM_FILESTREAM = (1 << 3), }; /*! \brief Data structure associated with a single frame of data |