aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/rtp.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/main/rtp.c b/main/rtp.c
index f20a46f8e..4774179ce 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -1590,14 +1590,8 @@ struct ast_frame *ast_rtp_read(struct ast_rtp *rtp)
rtp->lastrxformat = rtp->f.subclass = rtpPT.code;
rtp->f.frametype = (rtp->f.subclass & AST_FORMAT_AUDIO_MASK) ? AST_FRAME_VOICE : (rtp->f.subclass & AST_FORMAT_VIDEO_MASK) ? AST_FRAME_VIDEO : AST_FRAME_TEXT;
- if (!rtp->lastrxts)
- rtp->lastrxts = timestamp;
-
rtp->rxseqno = seqno;
- /* Record received timestamp as last received now */
- rtp->lastrxts = timestamp;
-
if (rtp->dtmfcount) {
rtp->dtmfcount -= (timestamp - rtp->lastrxts);
@@ -1613,6 +1607,9 @@ struct ast_frame *ast_rtp_read(struct ast_rtp *rtp)
}
}
+ /* Record received timestamp as last received now */
+ rtp->lastrxts = timestamp;
+
rtp->f.mallocd = 0;
rtp->f.datalen = res - hdrlen;
rtp->f.data = rtp->rawdata + hdrlen + AST_FRIENDLY_OFFSET;