From e7eae118917bad9732f79930b2f6471d81e853b9 Mon Sep 17 00:00:00 2001 From: baiyfcu Date: Wed, 3 Apr 2024 15:46:02 +0800 Subject: [PATCH] =?UTF-8?q?rtsp=E7=82=B9=E6=92=AD=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E6=97=B6=E4=B8=8D=E5=B8=A6range?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtsp/RtspPlayer.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Rtsp/RtspPlayer.cpp b/src/Rtsp/RtspPlayer.cpp index 1cf393e2..5e9f273b 100644 --- a/src/Rtsp/RtspPlayer.cpp +++ b/src/Rtsp/RtspPlayer.cpp @@ -426,9 +426,8 @@ void RtspPlayer::sendPause(int type, uint32_t seekMS) { // 开启或暂停rtsp switch (type) { case type_pause: sendRtspRequest("PAUSE", _control_url, {}); break; - case type_play: - // sendRtspRequest("PLAY", _content_base); - // break; + case type_play: sendRtspRequest("PLAY", _control_url); + break; case type_seek: sendRtspRequest("PLAY", _control_url, { "Range", StrPrinter << "npt=" << setiosflags(ios::fixed) << setprecision(2) << seekMS / 1000.0 << "-" }); break; @@ -440,7 +439,7 @@ void RtspPlayer::sendPause(int type, uint32_t seekMS) { } void RtspPlayer::pause(bool bPause) { - sendPause(bPause ? type_pause : type_seek, getProgressMilliSecond()); + sendPause(bPause ? type_pause : type_play, getProgressMilliSecond()); } void RtspPlayer::speed(float speed) {