mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-25 20:27:34 +08:00
HLS: 合并hls m3u8刷新延时相关pr(#1281)
This commit is contained in:
parent
0c1159959c
commit
5e2967d94a
@ -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
|
||||||
|
@ -74,9 +74,9 @@ public:
|
|||||||
* 内部是否含有子m3u8
|
* 内部是否含有子m3u8
|
||||||
*/
|
*/
|
||||||
bool isM3u8Inner() const;
|
bool isM3u8Inner() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 得到总时间
|
* 得到总时间
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
float getTotalDuration() const;
|
float getTotalDuration() const;
|
||||||
|
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user