Fixed HLS live last fragment being shown before completely being available.
This commit is contained in:
parent
9e07da4d97
commit
dc144e90d0
1 changed files with 4 additions and 1 deletions
|
@ -70,9 +70,12 @@ namespace Mist {
|
||||||
if (it != (myMeta.tracks[tid].fragments.end() - 1)){
|
if (it != (myMeta.tracks[tid].fragments.end() - 1)){
|
||||||
result << "#EXTINF:" << ((it->getDuration() + 500) / 1000) << ", no desc\r\n" << starttime << "_" << it->getDuration() + starttime << ".ts\r\n";
|
result << "#EXTINF:" << ((it->getDuration() + 500) / 1000) << ", no desc\r\n" << starttime << "_" << it->getDuration() + starttime << ".ts\r\n";
|
||||||
} else {
|
} else {
|
||||||
|
//only print the last segment when VoD
|
||||||
|
if (myMeta.vod){
|
||||||
result << "#EXTINF:" << ((myMeta.tracks[tid].lastms-starttime + 500) / 1000) << ", no desc\r\n" << starttime << "_" << myMeta.tracks[tid].lastms << ".ts\r\n";
|
result << "#EXTINF:" << ((myMeta.tracks[tid].lastms-starttime + 500) / 1000) << ", no desc\r\n" << starttime << "_" << myMeta.tracks[tid].lastms << ".ts\r\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if ( !myMeta.live){
|
if ( !myMeta.live){
|
||||||
result << "#EXT-X-ENDLIST\r\n";
|
result << "#EXT-X-ENDLIST\r\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue