diff options
author | Jonathan Rose <jrose@digium.com> | 2013-10-23 17:56:44 +0000 |
---|---|---|
committer | Jonathan Rose <jrose@digium.com> | 2013-10-23 17:56:44 +0000 |
commit | d7bac6cf4b981d7e393902227497b51fb47f671e (patch) | |
tree | e23fb8ba4c6c5108827077725d06a5b580566c8d /main | |
parent | 2966ca288c2d0b97199c09f37e8d3f8cb6b94638 (diff) |
res_rtp_asterisk: Address jittery DTMF events in RTP streams
(closes issue ASTERISK-21170)
Reported by: NITESH BANSAL
Patches:
dtmf-timestamp.patch uploaded by NITESH BANSAL (license 6418)
Review: https://reviewboard.asterisk.org/r/2938/
........
Merged revisions 401619 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 401620 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 401621 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/translate.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/translate.c b/main/translate.c index 70f09a952..5037b4283 100644 --- a/main/translate.c +++ b/main/translate.c @@ -537,6 +537,10 @@ struct ast_frame *ast_translate(struct ast_trans_pvt *path, struct ast_frame *f, /* Predict next outgoing timestamp from samples in this frame. */ path->nextout = ast_tvadd(path->nextout, ast_samp2tv(out->samples, ast_format_rate(&out->subclass.format))); + if (f->samples != out->samples && ast_test_flag(out, AST_FRFLAG_HAS_TIMING_INFO)) { + ast_debug(4, "Sample size different %u vs %u\n", f->samples, out->samples); + ast_clear_flag(out, AST_FRFLAG_HAS_TIMING_INFO); + } } else { out->delivery = ast_tv(0, 0); ast_set2_flag(out, has_timing_info, AST_FRFLAG_HAS_TIMING_INFO); |