Eliminate a copy and allocation for each incoming video packet

This commit is contained in:
Cameron Gutman
2019-04-25 16:07:34 -07:00
parent c87d4a755e
commit f395d3056a
4 changed files with 107 additions and 42 deletions

View File

@@ -126,8 +126,8 @@ static void ReceiveThreadProc(void* context) {
// The packet queue now has packets ready
buffer = NULL;
while ((queueEntry = RtpfGetQueuedPacket(&rtpQueue)) != NULL) {
// queueRtpPacket takes ownership of the packet
queueRtpPacket(queueEntry);
free(queueEntry->packet);
}
}
else if (queueStatus == RTPF_RET_QUEUED_NOTHING_READY) {