mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Fix object cache bug, reset payload when recycle
This commit is contained in:
parent
3d4d250eb9
commit
4d5c7e0a73
2 changed files with 18 additions and 2 deletions
|
@ -1078,6 +1078,12 @@ SrsRtpRawPayload::~SrsRtpRawPayload()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SrsRtpRawPayload::recycle()
|
||||||
|
{
|
||||||
|
payload=NULL; nn_payload=0;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
uint64_t SrsRtpRawPayload::nb_bytes()
|
uint64_t SrsRtpRawPayload::nb_bytes()
|
||||||
{
|
{
|
||||||
return nn_payload;
|
return nn_payload;
|
||||||
|
@ -1538,6 +1544,16 @@ SrsRtpFUAPayload2::~SrsRtpFUAPayload2()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SrsRtpFUAPayload2::recycle()
|
||||||
|
{
|
||||||
|
start = end = false;
|
||||||
|
nri = nalu_type = (SrsAvcNaluType)0;
|
||||||
|
|
||||||
|
payload = NULL;
|
||||||
|
size = 0;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
uint64_t SrsRtpFUAPayload2::nb_bytes()
|
uint64_t SrsRtpFUAPayload2::nb_bytes()
|
||||||
{
|
{
|
||||||
return 2 + size;
|
return 2 + size;
|
||||||
|
|
|
@ -473,7 +473,7 @@ public:
|
||||||
SrsRtpRawPayload();
|
SrsRtpRawPayload();
|
||||||
virtual ~SrsRtpRawPayload();
|
virtual ~SrsRtpRawPayload();
|
||||||
public:
|
public:
|
||||||
bool recycle() { return true; }
|
bool recycle();
|
||||||
// interface ISrsRtpPayloader
|
// interface ISrsRtpPayloader
|
||||||
public:
|
public:
|
||||||
virtual uint64_t nb_bytes();
|
virtual uint64_t nb_bytes();
|
||||||
|
@ -573,7 +573,7 @@ public:
|
||||||
SrsRtpFUAPayload2();
|
SrsRtpFUAPayload2();
|
||||||
virtual ~SrsRtpFUAPayload2();
|
virtual ~SrsRtpFUAPayload2();
|
||||||
public:
|
public:
|
||||||
bool recycle() { return true; }
|
bool recycle();
|
||||||
// interface ISrsRtpPayloader
|
// interface ISrsRtpPayloader
|
||||||
public:
|
public:
|
||||||
virtual uint64_t nb_bytes();
|
virtual uint64_t nb_bytes();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue