Fix HLS start issues for live streams.
This commit is contained in:
parent
401fe65979
commit
78d69673f3
1 changed files with 9 additions and 10 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue