Fixed HLS live missed fragment counter.
This commit is contained in:
parent
c6b860d54e
commit
42f5ef5468
1 changed files with 6 additions and 2 deletions
|
@ -54,8 +54,12 @@ namespace Mist {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result << "#EXTM3U\r\n"
|
result << "#EXTM3U\r\n"
|
||||||
"#EXT-X-TARGETDURATION:" << (longestFragment / 1000) + 1 << "\r\n"
|
"#EXT-X-TARGETDURATION:" << (longestFragment / 1000) + 1 << "\r\n";
|
||||||
"#EXT-X-MEDIA-SEQUENCE:" << myMeta.tracks[tid].missedFrags << "\r\n";
|
if (myMeta.live && myMeta.tracks[tid].fragments.size() > 2){
|
||||||
|
result << "#EXT-X-MEDIA-SEQUENCE:" << myMeta.tracks[tid].missedFrags+1 << "\r\n";
|
||||||
|
}else{
|
||||||
|
result << "#EXT-X-MEDIA-SEQUENCE:" << myMeta.tracks[tid].missedFrags << "\r\n";
|
||||||
|
}
|
||||||
for (std::deque<DTSC::Fragment>::iterator it = myMeta.tracks[tid].fragments.begin(); it != myMeta.tracks[tid].fragments.end(); it++){
|
for (std::deque<DTSC::Fragment>::iterator it = myMeta.tracks[tid].fragments.begin(); it != myMeta.tracks[tid].fragments.end(); it++){
|
||||||
if (myMeta.live && myMeta.tracks[tid].fragments.size() > 2 && it == myMeta.tracks[tid].fragments.begin()){
|
if (myMeta.live && myMeta.tracks[tid].fragments.size() > 2 && it == myMeta.tracks[tid].fragments.begin()){
|
||||||
//skip the first fragment if live and there are more than 2 fragments.
|
//skip the first fragment if live and there are more than 2 fragments.
|
||||||
|
|
Loading…
Add table
Reference in a new issue