Changed RTMP set peer bandwidth size from 4 to 5 bytes.
This commit is contained in:
parent
185d75e0d9
commit
49f9b44add
1 changed files with 12 additions and 5 deletions
|
@ -244,13 +244,20 @@ std::string & RTMPStream::SendCTL(unsigned char type, unsigned int data) {
|
|||
static RTMPStream::Chunk ch;
|
||||
ch.cs_id = 2;
|
||||
ch.timestamp = Util::getMS();
|
||||
ch.len = 4;
|
||||
ch.real_len = 4;
|
||||
ch.len_left = 0;
|
||||
ch.msg_type_id = type;
|
||||
ch.msg_stream_id = 0;
|
||||
ch.len_left = 0;
|
||||
if (type == 6){
|
||||
ch.len = 5;
|
||||
ch.real_len = 5;
|
||||
ch.data.resize(5);
|
||||
((char*)ch.data.data())[4] = 0;
|
||||
}else{
|
||||
ch.len = 4;
|
||||
ch.real_len = 4;
|
||||
ch.data.resize(4);
|
||||
*(int *)((char *)ch.data.c_str()) = htonl(data);
|
||||
}
|
||||
*(int *)((char *)ch.data.data()) = htonl(data);
|
||||
return ch.Pack();
|
||||
} //SendCTL
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue