mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 23:38:23 +00:00
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@105932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1313,7 +1313,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 {
|
||||
/* Video -- samples is # of samples vs. 90000 */
|
||||
if (!rtp->lastividtimestamp)
|
||||
|
||||
Reference in New Issue
Block a user