Fix HLS start issues for live streams.

This commit is contained in:
Thulinma 2015-12-25 14:47:20 +01:00
parent 401fe65979
commit 78d69673f3

View file

@ -120,16 +120,15 @@ namespace Mist {
if ( !myMeta.tracks.size()){
return 1;
}
//loop trough all the tracks
for (std::map<unsigned int,DTSC::Track>::iterator it = myMeta.tracks.begin(); it != myMeta.tracks.end(); it++){
//return "too late" if one track is past this point
if (ms < it->second.firstms){
return -1;
}
//return "too early" if one track is not yet at this point
if (ms > it->second.lastms){
return 1;
}
//check main track
DTSC::Track & mainTrack = myMeta.tracks[*selectedTracks.begin()];
//return "too late" if one track is past this point
if (ms < mainTrack.firstms){
return -1;
}
//return "too early" if one track is not yet at this point
if (ms > mainTrack.lastms){
return 1;
}
return 0;
}