From 9fbb9d0b6c8fb0f9fa3a4b8f22205beb7b1e15cf Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Wed, 21 Oct 2009 16:42:13 +0000 Subject: Merged revisions 225169 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r225169 | russell | 2009-10-21 11:39:20 -0500 (Wed, 21 Oct 2009) | 2 lines Isolate the frame returned from ast_translate(). ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225170 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/translate.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main/translate.c b/main/translate.c index a4a915291..223b5d30e 100644 --- a/main/translate.c +++ b/main/translate.c @@ -295,7 +295,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; @@ -364,7 +364,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 */ -- cgit v1.2.3