mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix bug of buffer assert, erase can accept any value
This commit is contained in:
parent
d48d739fa7
commit
a639eb0596
4 changed files with 29 additions and 12 deletions
|
@ -58,7 +58,9 @@ char* SrsBuffer::bytes()
|
|||
|
||||
void SrsBuffer::erase(int size)
|
||||
{
|
||||
srs_assert(size > 0);
|
||||
if (size <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (size >= length()) {
|
||||
data.clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue