diff --git a/main/translate.c b/main/translate.c index a4a915291f776d118f8b660e2bfede666b5fde23..223b5d30e7d08ff5e012d4b3bada27859266d8c3 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 */