HLS fixes for caching
This commit is contained in:
parent
652835cedd
commit
53f941449f
1 changed files with 6 additions and 5 deletions
|
@ -249,7 +249,7 @@ namespace Mist{
|
||||||
bool SegmentDownloader::atEnd() const{
|
bool SegmentDownloader::atEnd() const{
|
||||||
if (!isOpen || !currBuf){return true;}
|
if (!isOpen || !currBuf){return true;}
|
||||||
if (buffered){return currBuf->size() <= offset + 188;}
|
if (buffered){return currBuf->size() <= offset + 188;}
|
||||||
return segDL.isEOF();
|
return segDL.isEOF() && currBuf->size() <= offset + 188;
|
||||||
// return (packetPtr - segDL.const_data().data() + 188) > segDL.const_data().size();
|
// return (packetPtr - segDL.const_data().data() + 188) > segDL.const_data().size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1079,8 +1079,10 @@ namespace Mist{
|
||||||
// Update all playlists to make sure listEntries contains all live segments
|
// Update all playlists to make sure listEntries contains all live segments
|
||||||
for (std::map<uint64_t, Playlist>::iterator pListIt = playlistMapping.begin();
|
for (std::map<uint64_t, Playlist>::iterator pListIt = playlistMapping.begin();
|
||||||
pListIt != playlistMapping.end(); pListIt++){
|
pListIt != playlistMapping.end(); pListIt++){
|
||||||
|
if (pListIt->second.reloadNext < Util::bootSecs()){
|
||||||
pListIt->second.reload();
|
pListIt->second.reload();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
HIGH_MSG("Current playlist has parsed %zu/%" PRIu64 " entries", listEntries[currentPlaylist].size(), parsedSegments[currentPlaylist]);
|
HIGH_MSG("Current playlist has parsed %zu/%" PRIu64 " entries", listEntries[currentPlaylist].size(), parsedSegments[currentPlaylist]);
|
||||||
for(uint64_t entryIt = parsedSegments[currentPlaylist]; entryIt < listEntries[currentPlaylist].size(); entryIt++){
|
for(uint64_t entryIt = parsedSegments[currentPlaylist]; entryIt < listEntries[currentPlaylist].size(); entryIt++){
|
||||||
|
@ -1444,9 +1446,8 @@ namespace Mist{
|
||||||
// skip empty lines in the playlist
|
// skip empty lines in the playlist
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (line.compare(0, 26, "#EXT-X-PLAYLIST-TYPE:EVENT") == 0){
|
if (line.compare(0, 26, "#EXT-X-PLAYLIST-TYPE:EVENT") == 0){isLiveDVR = true;}
|
||||||
isLiveDVR = true;
|
if (line.compare(0, 14, "#EXT-X-ENDLIST") == 0){isLiveDVR = false;}
|
||||||
}
|
|
||||||
if (line.compare(0, 17, "#EXT-X-STREAM-INF") == 0){
|
if (line.compare(0, 17, "#EXT-X-STREAM-INF") == 0){
|
||||||
// this is a variant playlist file.. next line is an uri to a playlist
|
// this is a variant playlist file.. next line is an uri to a playlist
|
||||||
// file
|
// file
|
||||||
|
|
Loading…
Add table
Reference in a new issue