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