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; } }