aboutsummaryrefslogtreecommitdiffstats
path: root/main/rtp.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/rtp.c')
-rw-r--r--main/rtp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/rtp.c b/main/rtp.c
index cec29dc4a..6578c400e 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -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)