[outputs] Remove incorrect NULL return if packet buffer seqnum is 0

Since seqnum wraps around it should be ok to call rtp_packet_get() even when
session->seqnum is 0.
This commit is contained in:
ejurgensen 2020-11-03 23:44:22 +01:00
parent db5ba5bf47
commit 6eb01f8ffc

View File

@ -204,8 +204,11 @@ rtp_packet_get(struct rtp_session *session, uint16_t seqnum)
uint16_t delta;
size_t idx;
if (!session->seqnum || !session->pktbuf_len)
return NULL;
if (session->pktbuf_len == 0)
{
DPRINTF(E_DBG, L_PLAYER, "Seqnum %" PRIu16 " requested, but buffer is empty\n", seqnum);
return NULL;
}
last = session->seqnum - 1;
first = session->seqnum - session->pktbuf_len;