diff --git a/main/rtp.c b/main/rtp.c index e87d00b226a6e5e878215c3d52144efa6d91257a..782642969d83bc5ca2ce75bdf0034690390b9291 100644 --- a/main/rtp.c +++ b/main/rtp.c @@ -1735,14 +1735,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); @@ -1758,6 +1752,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.ptr = rtp->rawdata + hdrlen + AST_FRIENDLY_OFFSET;