mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix bug of librtmp after RTMP protocol stack refined, never use cid=2 to send data.
This commit is contained in:
parent
e3be7bfa88
commit
7cbe18902f
1 changed files with 11 additions and 1 deletions
|
@ -1393,7 +1393,8 @@ SrsMessageHeader::SrsMessageHeader()
|
||||||
stream_id = 0;
|
stream_id = 0;
|
||||||
|
|
||||||
timestamp = 0;
|
timestamp = 0;
|
||||||
perfer_cid = RTMP_CID_ProtocolControl;
|
// we always use the connection chunk-id
|
||||||
|
perfer_cid = RTMP_CID_OverConnection;
|
||||||
}
|
}
|
||||||
|
|
||||||
SrsMessageHeader::~SrsMessageHeader()
|
SrsMessageHeader::~SrsMessageHeader()
|
||||||
|
@ -1457,6 +1458,9 @@ void SrsMessageHeader::initialize_amf0_script(int size, int stream)
|
||||||
timestamp_delta = (int32_t)0;
|
timestamp_delta = (int32_t)0;
|
||||||
timestamp = (int64_t)0;
|
timestamp = (int64_t)0;
|
||||||
stream_id = (int32_t)stream;
|
stream_id = (int32_t)stream;
|
||||||
|
|
||||||
|
// amf0 script use connection2 chunk-id
|
||||||
|
perfer_cid = RTMP_CID_OverConnection2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SrsMessageHeader::initialize_audio(int size, u_int32_t time, int stream)
|
void SrsMessageHeader::initialize_audio(int size, u_int32_t time, int stream)
|
||||||
|
@ -1466,6 +1470,9 @@ void SrsMessageHeader::initialize_audio(int size, u_int32_t time, int stream)
|
||||||
timestamp_delta = (int32_t)time;
|
timestamp_delta = (int32_t)time;
|
||||||
timestamp = (int64_t)time;
|
timestamp = (int64_t)time;
|
||||||
stream_id = (int32_t)stream;
|
stream_id = (int32_t)stream;
|
||||||
|
|
||||||
|
// audio chunk-id
|
||||||
|
perfer_cid = RTMP_CID_Audio;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SrsMessageHeader::initialize_video(int size, u_int32_t time, int stream)
|
void SrsMessageHeader::initialize_video(int size, u_int32_t time, int stream)
|
||||||
|
@ -1475,6 +1482,9 @@ void SrsMessageHeader::initialize_video(int size, u_int32_t time, int stream)
|
||||||
timestamp_delta = (int32_t)time;
|
timestamp_delta = (int32_t)time;
|
||||||
timestamp = (int64_t)time;
|
timestamp = (int64_t)time;
|
||||||
stream_id = (int32_t)stream;
|
stream_id = (int32_t)stream;
|
||||||
|
|
||||||
|
// video chunk-id
|
||||||
|
perfer_cid = RTMP_CID_Video;
|
||||||
}
|
}
|
||||||
|
|
||||||
SrsChunkStream::SrsChunkStream(int _cid)
|
SrsChunkStream::SrsChunkStream(int _cid)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue