mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-11-24 00:47:21 +08:00
AI automatically translates all comments in the code into English (#3917)
This commit is contained in:
@@ -26,7 +26,8 @@ void CommonRtpDecoder::obtainFrame() {
|
||||
bool CommonRtpDecoder::inputRtp(const RtpPacket::Ptr &rtp, bool){
|
||||
auto payload_size = rtp->getPayloadSize();
|
||||
if (payload_size <= 0) {
|
||||
//无实际负载
|
||||
// 无实际负载 [AUTO-TRANSLATED:305af48f]
|
||||
// No actual load
|
||||
return false;
|
||||
}
|
||||
auto payload = rtp->getPayload();
|
||||
@@ -34,19 +35,23 @@ bool CommonRtpDecoder::inputRtp(const RtpPacket::Ptr &rtp, bool){
|
||||
auto seq = rtp->getSeq();
|
||||
|
||||
if (_last_stamp != stamp || _frame->_buffer.size() > _max_frame_size) {
|
||||
//时间戳发生变化或者缓存超过MAX_FRAME_SIZE,则清空上帧数据
|
||||
// 时间戳发生变化或者缓存超过MAX_FRAME_SIZE,则清空上帧数据 [AUTO-TRANSLATED:96f15576]
|
||||
// If the timestamp changes or the cache exceeds MAX_FRAME_SIZE, clear the previous frame data
|
||||
if (!_frame->_buffer.empty()) {
|
||||
//有有效帧,则输出
|
||||
// 有有效帧,则输出 [AUTO-TRANSLATED:f3ff1bda]
|
||||
// If there is a valid frame, output it
|
||||
RtpCodec::inputFrame(_frame);
|
||||
}
|
||||
|
||||
//新的一帧数据
|
||||
// 新的一帧数据 [AUTO-TRANSLATED:5b5f3a35]
|
||||
// New frame data
|
||||
obtainFrame();
|
||||
_frame->_dts = rtp->getStampMS();
|
||||
_last_stamp = stamp;
|
||||
_drop_flag = false;
|
||||
} else if (_last_seq != 0 && (uint16_t)(_last_seq + 1) != seq) {
|
||||
//时间戳未发生变化,但是seq却不连续,说明中间rtp丢包了,那么整帧应该废弃
|
||||
// 时间戳未发生变化,但是seq却不连续,说明中间rtp丢包了,那么整帧应该废弃 [AUTO-TRANSLATED:577bf835]
|
||||
// If the timestamp does not change, but the seq is not continuous, it means that the RTP packet has been lost in the middle, so the entire frame should be discarded
|
||||
WarnL << "rtp丢包:" << _last_seq << " -> " << seq;
|
||||
_drop_flag = true;
|
||||
_frame->_buffer.clear();
|
||||
|
||||
Reference in New Issue
Block a user