Removed TS-level discontinuities from HLS
This commit is contained in:
parent
f69fe8a4fb
commit
653f5cf085
2 changed files with 18 additions and 1 deletions
|
@ -277,7 +277,25 @@ namespace Mist {
|
||||||
stop();
|
stop();
|
||||||
wantRequest = true;
|
wantRequest = true;
|
||||||
parseData = false;
|
parseData = false;
|
||||||
|
|
||||||
//Ensure alignment of contCounters for selected tracks, to prevent discontinuities.
|
//Ensure alignment of contCounters for selected tracks, to prevent discontinuities.
|
||||||
|
for (std::set<unsigned long>::iterator it = selectedTracks.begin(); it != selectedTracks.end(); ++it){
|
||||||
|
DTSC::Track & Trk = myMeta.tracks[*it];
|
||||||
|
uint32_t pkgPid = 255 + *it;
|
||||||
|
int & contPkg = contCounters[pkgPid];
|
||||||
|
if (contPkg % 16 != 0){
|
||||||
|
packData.clear();
|
||||||
|
packData.setPID(pkgPid);
|
||||||
|
packData.addStuffing();
|
||||||
|
while (contPkg % 16 != 0){
|
||||||
|
packData.setContinuityCounter(++contPkg);
|
||||||
|
sendTS(packData.checkAndGetBuffer());
|
||||||
|
}
|
||||||
|
packData.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Signal end of data
|
||||||
H.Chunkify("", 0, myConn);
|
H.Chunkify("", 0, myConn);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,6 @@ namespace Mist {
|
||||||
packData.setContinuityCounter(++contPkg);
|
packData.setContinuityCounter(++contPkg);
|
||||||
if (firstPack){
|
if (firstPack){
|
||||||
packData.setUnitStart(1);
|
packData.setUnitStart(1);
|
||||||
packData.setDiscontinuity(true);
|
|
||||||
if (video){
|
if (video){
|
||||||
if (keyframe){
|
if (keyframe){
|
||||||
packData.setRandomAccess(true);
|
packData.setRandomAccess(true);
|
||||||
|
|
Loading…
Add table
Reference in a new issue