Merge branch 'master' of https://gitee.com/xia-chu/ZLMediaKit into transcode2

# Conflicts:
#	src/Common/config.cpp
#	src/Common/config.h
This commit is contained in:
cqm
2024-08-19 17:39:50 +08:00
46 changed files with 382 additions and 333 deletions

View File

@@ -86,7 +86,7 @@ bool AACRtpDecoder::inputRtp(const RtpPacket::Ptr &rtp, bool key_pos) {
}
// 每个audio unit时间戳增量
auto dts_inc = (stamp - _last_dts) / au_header_count;
auto dts_inc = static_cast<int64_t>(stamp - _last_dts) / au_header_count;
if (dts_inc < 0 || dts_inc > 100) {
// 时间戳增量异常,忽略
dts_inc = 0;

View File

@@ -184,7 +184,7 @@ void H264RtpDecoder::outputFrame(const RtpPacket::Ptr &rtp, const H264Frame::Ptr
_gop_dropped = false;
InfoL << "new gop received, rtp:\r\n" << rtp->dumpString();
}
if (!_gop_dropped) {
if (!_gop_dropped || frame->configFrame()) {
RtpCodec::inputFrame(frame);
}
_frame = obtainFrame();

View File

@@ -240,7 +240,7 @@ void H265RtpDecoder::outputFrame(const RtpPacket::Ptr &rtp, const H265Frame::Ptr
_gop_dropped = false;
InfoL << "new gop received, rtp:\r\n" << rtp->dumpString();
}
if (!_gop_dropped) {
if (!_gop_dropped || frame->configFrame()) {
RtpCodec::inputFrame(frame);
}
_frame = obtainFrame();

View File

@@ -598,7 +598,7 @@ void JPEGRtpEncoder::rtpSendJpeg(const uint8_t *buf, int size, uint64_t pts, uin
{
const uint8_t *qtables[4] = { NULL };
int nb_qtables = 0;
uint8_t w, h;
uint8_t w { 0 }, h { 0 };
uint8_t *p;
int off = 0; /* fragment offset of the current JPEG frame */
int len;