diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-03-19 15:03:43 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-03-19 15:03:43 +0000 |
commit | 237ae0f4c2ed676a5be2482d2eccca24ad638338 (patch) | |
tree | 8d7f79be381372276050fe9ef54c052fe7722dc7 /translate.c | |
parent | 8784ee156882231c52cfb33e8ffe102c11079e26 (diff) |
First pass at populating delivery times through translation. Not sure how this will affect translations with different packet sizes, but it *ought* to resolve itself in the end.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2474 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'translate.c')
-rwxr-xr-x | translate.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/translate.c b/translate.c index 0f2bc9efc..4ed3fecee 100755 --- a/translate.c +++ b/translate.c @@ -130,9 +130,12 @@ struct ast_frame *ast_translate(struct ast_trans_pvt *path, struct ast_frame *f, { struct ast_trans_pvt *p; struct ast_frame *out; + struct timeval delivery; p = path; /* Feed the first frame into the first translator */ p->step->framein(p->state, f); + delivery.tv_sec = f->delivery.tv_sec; + delivery.tv_usec = f->delivery.tv_usec; if (consume) ast_frfree(f); while(p) { @@ -144,8 +147,11 @@ struct ast_frame *ast_translate(struct ast_trans_pvt *path, struct ast_frame *f, return this frame */ if (p->next) p->next->step->framein(p->next->state, out); - else + else { + out->delivery.tv_sec = f->delivery.tv_sec; + out->delivery.tv_usec = f->delivery.tv_usec; return out; + } p = p->next; } ast_log(LOG_WARNING, "I should never get here...\n"); |