Updated the buffer to reflect on non-video keyframes

This commit is contained in:
Erik Zandvliet 2014-04-18 11:21:35 +02:00 committed by Thulinma
parent a5a8546250
commit 87a2f50dc9

View file

@ -228,14 +228,7 @@ namespace Mist {
if (inputLoc[tNum][pageNum].firstTime == 0){
inputLoc[tNum][pageNum].firstTime = tmpPack.getTime();
}
//Overloaded use of .firstTime to indicate last Keytime on non-video streams;
if (myMeta.tracks[tNum].type == "video"){
inputLoc[tNum][pageNum].keyNum += tmpPack.getFlag("keyframe");
}else{
if ((tmpPack.getTime() > 5000) && ((tmpPack.getTime() - 5000) > inputLoc[tNum][pageNum].firstTime)){
inputLoc[tNum][pageNum].keyNum ++;
}
}
inputLoc[tNum][pageNum].keyNum += tmpPack.getFlag("keyframe");
inputLoc[tNum][pageNum].curOffset += tmpPack.getDataLen();
tmpPack.reInit(dataPages[tNum][pageNum].mapped + inputLoc[tNum][pageNum].curOffset, 0);
}