HLS: 合并hls m3u8刷新延时相关pr(#1281)

This commit is contained in:
ziyue 2021-12-17 11:40:54 +08:00
parent 0c1159959c
commit 5e2967d94a
3 changed files with 3 additions and 2 deletions

View File

@ -140,4 +140,5 @@ bool HlsParser::isM3u8Inner() const {
float HlsParser::getTotalDuration() const { float HlsParser::getTotalDuration() const {
return _total_dur; return _total_dur;
} }
}//namespace mediakit }//namespace mediakit

View File

@ -74,9 +74,9 @@ public:
* m3u8 * m3u8
*/ */
bool isM3u8Inner() const; bool isM3u8Inner() const;
/** /**
* *
* @return
*/ */
float getTotalDuration() const; float getTotalDuration() const;

View File

@ -200,7 +200,7 @@ float HlsPlayer::delaySecond() {
targetOffset = HlsParser::getTotalDuration(); targetOffset = HlsParser::getTotalDuration();
} }
// 根据规范为一半的时间 // 根据规范为一半的时间
if(targetOffset / 2 > 1.0f) { if (targetOffset / 2 > 1.0f) {
return targetOffset / 2; return targetOffset / 2;
} }
} }