mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-08 06:12:45 +00:00
Isolate the frame returned from ast_translate().
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@225169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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_frame *ast_translate(struct ast_trans_pvt *path, struct ast_frame *f, int consume)
|
||||||
{
|
{
|
||||||
struct ast_trans_pvt *p = path;
|
struct ast_trans_pvt *p = path;
|
||||||
struct ast_frame *out = f;
|
struct ast_frame *out = f, *ret;
|
||||||
struct timeval delivery;
|
struct timeval delivery;
|
||||||
int has_timing_info;
|
int has_timing_info;
|
||||||
long ts;
|
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 */
|
/* Invalidate prediction if we're entering a silence period */
|
||||||
if (out->frametype == AST_FRAME_CNG)
|
if (out->frametype == AST_FRAME_CNG)
|
||||||
path->nextout = ast_tv(0, 0);
|
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 */
|
/*! \brief compute the cost of a single translation step */
|
||||||
|
Reference in New Issue
Block a user