- fixes for pvqa_pcap project - lazy creation of codecs + compare timespec structures

This commit is contained in:
2024-12-24 13:19:54 +03:00
parent b5d0242c74
commit c45c686582
5 changed files with 62 additions and 7 deletions

View File

@@ -420,13 +420,10 @@ bool AudioReceiver::add(const std::shared_ptr<jrtplib::RTPPacket>& p, Codec** co
return false; // Reject packet with unknown payload type
}
// Check if codec is created actually
// Check if codec is creating lazily
if (!codecIter->second)
{
// Look for ptype
for (int codecIndex = 0; codecIndex < mCodecList.count(); codecIndex++)
if (mCodecList.codecAt(codecIndex).payloadType() == p->GetPayloadType())
codecIter->second = mCodecList.codecAt(codecIndex).create();
codecIter->second = mCodecList.createCodecByPayloadType(ptype);
}
// Return pointer to codec if needed.get()