mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-28 14:16:32 +08:00
Compare commits
2 Commits
3254b5650e
...
20461b87ee
Author | SHA1 | Date | |
---|---|---|---|
|
20461b87ee | ||
|
faa6c283d7 |
@ -55,8 +55,8 @@ void RtspMediaSource::onWrite(RtpPacket::Ptr rtp, bool keyPos) {
|
||||
auto &track = _tracks[rtp->type];
|
||||
auto stamp = rtp->getStampMS();
|
||||
bool is_video = rtp->type == TrackVideo;
|
||||
|
||||
if (track && ((keyPos && _have_video && is_video) || (!_have_video))) {
|
||||
// 音频总是更新,视频在关键包时更新
|
||||
if (track && ((keyPos && _have_video && is_video) || (!is_video))) {
|
||||
track->_seq = rtp->getSeq();
|
||||
track->_time_stamp = rtp->getStamp() * uint64_t(1000) / rtp->sample_rate;
|
||||
track->_ssrc = rtp->getSSRC();
|
||||
|
Loading…
Reference in New Issue
Block a user