From d36e64eff413afad4df248e2a93e3bbb50e2afb2 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sun, 1 Nov 2020 21:33:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E5=8D=87=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtsp/RtspMediaSource.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Rtsp/RtspMediaSource.h b/src/Rtsp/RtspMediaSource.h index 869eae73..119a3e4c 100644 --- a/src/Rtsp/RtspMediaSource.h +++ b/src/Rtsp/RtspMediaSource.h @@ -84,7 +84,7 @@ public: */ virtual uint32_t getSsrc(TrackType trackType) { assert(trackType >= 0 && trackType < TrackMax); - auto track = _tracks[trackType]; + auto &track = _tracks[trackType]; if (!track) { return 0; } @@ -96,7 +96,7 @@ public: */ virtual uint16_t getSeqence(TrackType trackType) { assert(trackType >= 0 && trackType < TrackMax); - auto track = _tracks[trackType]; + auto &track = _tracks[trackType]; if (!track) { return 0; } @@ -110,7 +110,7 @@ public: assert(trackType >= TrackInvalid && trackType < TrackMax); if (trackType != TrackInvalid) { //获取某track的时间戳 - auto track = _tracks[trackType]; + auto &track = _tracks[trackType]; if (track) { return track->_time_stamp; } @@ -159,7 +159,7 @@ public: void onWrite(RtpPacket::Ptr rtp, bool keyPos) override { _speed += rtp->size(); assert(rtp->type >= 0 && rtp->type < TrackMax); - auto track = _tracks[rtp->type]; + auto &track = _tracks[rtp->type]; if (track) { track->_seq = rtp->sequence; track->_time_stamp = rtp->timeStamp;