修复访问空指针的bug

This commit is contained in:
xiongziliang
2026-08-21 13:22:38 +08:00
parent ee42f6b2c2
commit fdaec2604d

View File

@@ -33,8 +33,8 @@ void RtspMediaSource::onWrite(RtpPacket::Ptr rtp, bool keyPos) {
regist();
}
}
PacketCache<RtpPacket>::inputPacket(stamp, rtp->type == TrackVideo, std::move(rtp), keyPos);
auto is_video = rtp->type == TrackVideo;
PacketCache<RtpPacket>::inputPacket(stamp, is_video, std::move(rtp), keyPos);
}
RtspMediaSourceImp::RtspMediaSourceImp(const MediaTuple& tuple, int ringSize): RtspMediaSource(tuple, ringSize)