mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 12:37:09 +08:00
rtp打包添加mark位:#713
This commit is contained in:
parent
ae8588089d
commit
629c39685b
@ -77,9 +77,16 @@ void CommonRtpEncoder::inputFrame(const Frame::Ptr &frame){
|
|||||||
auto remain_size = len;
|
auto remain_size = len;
|
||||||
const auto max_rtp_size = _ui32MtuSize - 20;
|
const auto max_rtp_size = _ui32MtuSize - 20;
|
||||||
|
|
||||||
|
bool mark = false;
|
||||||
while (remain_size > 0) {
|
while (remain_size > 0) {
|
||||||
auto rtp_size = remain_size > max_rtp_size ? max_rtp_size : remain_size;
|
size_t rtp_size;
|
||||||
RtpCodec::inputRtp(makeRtp(getTrackType(), ptr, rtp_size, false, stamp), false);
|
if (remain_size > max_rtp_size) {
|
||||||
|
rtp_size = max_rtp_size;
|
||||||
|
} else {
|
||||||
|
rtp_size = remain_size;
|
||||||
|
mark = true;
|
||||||
|
}
|
||||||
|
RtpCodec::inputRtp(makeRtp(getTrackType(), ptr, rtp_size, mark, stamp), false);
|
||||||
ptr += rtp_size;
|
ptr += rtp_size;
|
||||||
remain_size -= rtp_size;
|
remain_size -= rtp_size;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user