From: Joshua Colp Date: Mon, 20 Apr 2020 16:14:35 +0000 (-0500) Subject: Revert "res_rtp_asterisk: Resolve loop when receive buffer is flushed" X-Git-Tag: certified/16.8-cert1~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a75317ce247b913d1cb92b9ffa47a49aa56b172a;p=thirdparty%2Fasterisk.git Revert "res_rtp_asterisk: Resolve loop when receive buffer is flushed" This reverts commit 22bc8a71680e4099ffd3ccff7b3fe33d26291c36. Reason for revert: Waiting for future release. Change-Id: If924f0b7fa02a72b52c708aa80addc361a87b490 --- diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c index 134eebc07c..6c4f408025 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -7736,14 +7736,6 @@ static struct ast_frame *ast_rtp_read(struct ast_rtp_instance *instance, int rtc ast_debug(2, "Inserted just received packet with sequence number '%d' in correct order on RTP instance '%p'\n", seqno, instance); } - /* It is possible due to packet retransmission for this packet to also exist in the receive - * buffer so we explicitly remove it in case this occurs, otherwise the receive buffer will - * never be empty. - */ - payload = (struct ast_rtp_rtcp_nack_payload *)ast_data_buffer_remove(rtp->recv_buffer, seqno); - if (payload) { - ast_free(payload); - } rtp->expectedrxseqno++; if (rtp->expectedrxseqno == SEQNO_CYCLE_OVER) { rtp->expectedrxseqno = 0;