mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-13 16:03:23 -05:00
[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:
parent
db5ba5bf47
commit
6eb01f8ffc
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user