|
|
|
@ -823,9 +823,8 @@ char* SrsRtpPacket::wrap(char* data, int size)
|
|
|
|
|
|
|
|
|
|
char* SrsRtpPacket::wrap(SrsSharedPtrMessage* msg)
|
|
|
|
|
{
|
|
|
|
|
// Generally, the wrap(msg) is used for RTMP to RTC, which is not generated by RTC,
|
|
|
|
|
// so we do not recycle the msg. It's ok to directly free the msg, event the msg is
|
|
|
|
|
// allocated by object cache manager.
|
|
|
|
|
// Generally, the wrap(msg) is used for RTMP to RTC, where the msg
|
|
|
|
|
// is not generated by RTC.
|
|
|
|
|
srs_freep(shared_buffer_);
|
|
|
|
|
|
|
|
|
|
// Copy from the new message.
|
|
|
|
@ -840,11 +839,6 @@ SrsRtpPacket* SrsRtpPacket::copy()
|
|
|
|
|
{
|
|
|
|
|
SrsRtpPacket* cp = new SrsRtpPacket();
|
|
|
|
|
|
|
|
|
|
// We got packet from cache, the payload and message MUST be NULL,
|
|
|
|
|
// because we had clear it in recycle.
|
|
|
|
|
//srs_assert(!cp->payload_);
|
|
|
|
|
//srs_assert(!cp->shared_buffer_);
|
|
|
|
|
|
|
|
|
|
cp->header = header;
|
|
|
|
|
cp->payload_ = payload_? payload_->copy():NULL;
|
|
|
|
|
cp->payload_type_ = payload_type_;
|
|
|
|
|