Fixed HLS live last fragment being shown before completely being available.

This commit is contained in:
Thulinma 2014-09-06 13:16:06 +02:00
parent 9e07da4d97
commit dc144e90d0

View file

@ -70,7 +70,10 @@ namespace Mist {
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";
} else {
result << "#EXTINF:" << ((myMeta.tracks[tid].lastms-starttime + 500) / 1000) << ", no desc\r\n" << starttime << "_" << myMeta.tracks[tid].lastms << ".ts\r\n";
//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";
}
}
}
if ( !myMeta.live){