mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Store the actual size of buffer for RTP packet.
This commit is contained in:
parent
171ae5dd2d
commit
b91d37b78a
3 changed files with 43 additions and 33 deletions
|
@ -289,7 +289,10 @@ private:
|
|||
SrsRtpPacketPayloadType payload_type_;
|
||||
private:
|
||||
// The original shared message, all RTP packets can refer to its data.
|
||||
SrsSharedPtrMessage* shared_msg;
|
||||
// Note that the size of shared msg, is not the packet size, it's a larger aligned buffer.
|
||||
SrsSharedPtrMessage* shared_buffer;
|
||||
// The size of original packet.
|
||||
int actual_buffer_size_;
|
||||
// Helper fields.
|
||||
public:
|
||||
// The first byte as nalu type, for video decoder only.
|
||||
|
@ -311,7 +314,7 @@ public:
|
|||
void reset();
|
||||
private:
|
||||
void recycle_payload();
|
||||
void recycle_shared_msg();
|
||||
void recycle_shared_buffer();
|
||||
public:
|
||||
// Recycle the object to reuse it.
|
||||
virtual bool recycle();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue