diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-04-20 15:28:58 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-04-20 15:28:58 +0000 |
commit | 6e032f5e851eba507c30463fe6c5413531d96065 (patch) | |
tree | 73708a49ee03c92bc69ab3a41352dc34b6314cd7 /translate.c | |
parent | 2ba5286787b559afc81fd111468258c55cfde8f1 (diff) |
Don't dereference consumed frame delivery.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2719 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'translate.c')
-rwxr-xr-x | translate.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/translate.c b/translate.c index 6433fc537..2c69d5cc8 100755 --- a/translate.c +++ b/translate.c @@ -137,6 +137,7 @@ 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); @@ -179,6 +180,8 @@ struct ast_frame *ast_translate(struct ast_trans_pvt *path, struct ast_frame *f, path->nextin.tv_sec++; } } + delivery.tv_sec = f->delivery.tv_sec; + delivery.tv_usec = f->delivery.tv_usec; if (consume) ast_frfree(f); while(p) { @@ -191,7 +194,7 @@ struct ast_frame *ast_translate(struct ast_trans_pvt *path, struct ast_frame *f, if (p->next) p->next->step->framein(p->next->state, out); else { - if (f->delivery.tv_sec || f->delivery.tv_usec) { + if (delivery.tv_sec || delivery.tv_usec) { /* Use next predicted outgoing timestamp */ out->delivery.tv_sec = path->nextout.tv_sec; out->delivery.tv_usec = path->nextout.tv_usec; |