Fixed outputs not reporting their current position accurately, improved buffering behaviour for VoD inputs.

This commit is contained in:
Thulinma 2018-11-01 17:05:25 +01:00
parent 425e98c6fd
commit b12c0254e1
2 changed files with 10 additions and 3 deletions

View file

@ -1061,7 +1061,7 @@ namespace Mist{
}
//when live, every keyframe, check correctness of the keyframe number
if (myMeta.live && thisPacket.getFlag("keyframe")){
if (thisPacket.getFlag("keyframe")){
//cancel if not alive
if (!nProxy.userClient.isAlive()){
return false;
@ -1070,7 +1070,7 @@ namespace Mist{
//Failure here will cause tracks to drop due to inconsistent internal state.
nxtKeyNum[nxt.tid] = getKeyForTime(nxt.tid, thisPacket.getTime());
int counter = 0;
while(counter < 40 && myMeta.tracks[nxt.tid].getKey(nxtKeyNum[nxt.tid]).getTime() != thisPacket.getTime()){
while(myMeta.live && counter < 40 && myMeta.tracks[nxt.tid].getKey(nxtKeyNum[nxt.tid]).getTime() != thisPacket.getTime()){
if (counter++){
//Only sleep 250ms if this is not the first updatemeta try
Util::wait(250);