mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Only cache the UDP packet message
This commit is contained in:
parent
e79293a3bc
commit
30809aee60
6 changed files with 34 additions and 11 deletions
|
@ -361,8 +361,12 @@ SrsSharedPtrMessage* SrsSharedPtrMessage::copy()
|
|||
{
|
||||
srs_assert(ptr);
|
||||
|
||||
SrsSharedPtrMessage* copy = _srs_rtp_msg_cache->allocate();
|
||||
|
||||
SrsSharedPtrMessage* copy = _srs_rtp_msg_cache2->allocate();
|
||||
|
||||
// We got an object from cache, the ptr might exists, so unwrap it.
|
||||
copy->unwrap();
|
||||
|
||||
// Reference to this message instead.
|
||||
copy->ptr = ptr;
|
||||
ptr->shared_count++;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue