1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

SrsPacket supports converting to message, so can be sent by one API.

This commit is contained in:
winlin 2019-12-12 15:11:31 +08:00
parent 82c4f41975
commit 2731fe1f3e
7 changed files with 472 additions and 70 deletions

View file

@ -64,9 +64,9 @@ void SrsSimpleStream::erase(int size)
void SrsSimpleStream::append(const char* bytes, int size)
{
srs_assert(size > 0);
data.insert(data.end(), bytes, bytes + size);
if (size > 0) {
data.insert(data.end(), bytes, bytes + size);
}
}
void SrsSimpleStream::append(SrsSimpleStream* src)