From 5e2967d94a8eee7fe1ebda41383115d23131ebf7 Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Fri, 17 Dec 2021 11:40:54 +0800 Subject: [PATCH] =?UTF-8?q?HLS:=20=E5=90=88=E5=B9=B6hls=20m3u8=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E5=BB=B6=E6=97=B6=E7=9B=B8=E5=85=B3pr(#1281)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Http/HlsParser.cpp | 1 + src/Http/HlsParser.h | 2 +- src/Http/HlsPlayer.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Http/HlsParser.cpp b/src/Http/HlsParser.cpp index 2ab64ddf..03c80c6a 100644 --- a/src/Http/HlsParser.cpp +++ b/src/Http/HlsParser.cpp @@ -140,4 +140,5 @@ bool HlsParser::isM3u8Inner() const { float HlsParser::getTotalDuration() const { return _total_dur; } + }//namespace mediakit diff --git a/src/Http/HlsParser.h b/src/Http/HlsParser.h index d4c253a0..d3ccbc2c 100644 --- a/src/Http/HlsParser.h +++ b/src/Http/HlsParser.h @@ -74,9 +74,9 @@ public: * 内部是否含有子m3u8 */ bool isM3u8Inner() const; + /** * 得到总时间 - * @return */ float getTotalDuration() const; diff --git a/src/Http/HlsPlayer.cpp b/src/Http/HlsPlayer.cpp index e2cd530d..25046951 100644 --- a/src/Http/HlsPlayer.cpp +++ b/src/Http/HlsPlayer.cpp @@ -200,7 +200,7 @@ float HlsPlayer::delaySecond() { targetOffset = HlsParser::getTotalDuration(); } // 根据规范为一半的时间 - if(targetOffset / 2 > 1.0f) { + if (targetOffset / 2 > 1.0f) { return targetOffset / 2; } }