diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-06 00:16:30 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-06 00:16:30 +0000 |
commit | 1fb47926d2de3a02e5f452b8d7c9945ca2fa58b2 (patch) | |
tree | 2c2ea15fbaf06e62b0950f17e96140076eb7c75f /main/rtp.c | |
parent | cb639936d1e86c30af8a0537928c74ee8c67d480 (diff) |
Merged revisions 105933 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r105933 | russell | 2008-03-04 19:54:16 -0600 (Tue, 04 Mar 2008) | 13 lines
Merged revisions 105932 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r105932 | russell | 2008-03-04 19:52:18 -0600 (Tue, 04 Mar 2008) | 5 lines
Fix a bug that I just noticed in the RTP code. The calculation for setting the
len field in an ast_frame of audio was wrong when G.722 is in use. The len field
represents the number of ms of audio that the frame contains. It would have
set the value to be twice what it should be.
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@106310 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/rtp.c')
-rw-r--r-- | main/rtp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/rtp.c b/main/rtp.c index 9777a5183..5be0586c6 100644 --- a/main/rtp.c +++ b/main/rtp.c @@ -1612,7 +1612,7 @@ struct ast_frame *ast_rtp_read(struct ast_rtp *rtp) /* Add timing data to let ast_generic_bridge() put the frame into a jitterbuf */ ast_set_flag(&rtp->f, AST_FRFLAG_HAS_TIMING_INFO); rtp->f.ts = timestamp / 8; - rtp->f.len = rtp->f.samples / 8; + rtp->f.len = rtp->f.samples / ( (ast_format_rate(rtp->f.subclass) == 16000) ? 16 : 8 ); } else if(rtp->f.subclass & AST_FORMAT_VIDEO_MASK) { /* Video -- samples is # of samples vs. 90000 */ if (!rtp->lastividtimestamp) |