diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-10-21 16:39:20 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-10-21 16:39:20 +0000 |
commit | 7a9aa43ca457c72810cfdc8ce6155f4b049bcc8d (patch) | |
tree | be5483a967c81c99812a8ea3de9cf9379b67b51c /main/translate.c | |
parent | 1108195e5b2814451ec22c190be7d0ca2d9ead10 (diff) |
Isolate the frame returned from ast_translate().
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@225169 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/translate.c')
-rw-r--r-- | main/translate.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/main/translate.c b/main/translate.c index a928470bf..9ee2f664f 100644 --- a/main/translate.c +++ b/main/translate.c @@ -301,7 +301,7 @@ struct ast_trans_pvt *ast_translator_build_path(int dest, int source) struct ast_frame *ast_translate(struct ast_trans_pvt *path, struct ast_frame *f, int consume) { struct ast_trans_pvt *p = path; - struct ast_frame *out = f; + struct ast_frame *out = f, *ret; struct timeval delivery; int has_timing_info; long ts; @@ -370,7 +370,11 @@ struct ast_frame *ast_translate(struct ast_trans_pvt *path, struct ast_frame *f, /* Invalidate prediction if we're entering a silence period */ if (out->frametype == AST_FRAME_CNG) path->nextout = ast_tv(0, 0); - return out; + + ret = ast_frisolate(out); + ast_frfree(out); + + return ret; } /*! \brief compute the cost of a single translation step */ |