Ignore packets with invalid timestamps in VoD inputs

This commit is contained in:
Thulinma 2016-07-06 16:09:46 +02:00
parent 9e9550f2b7
commit 9a1fb0873f

View file

@ -467,8 +467,12 @@ namespace Mist {
while (thisPacket && thisPacket.getTime() < (unsigned long long)myMeta.tracks[track].keys[keyNum - 1].getTime()){
getNext();
}
while (thisPacket && thisPacket.getTime() < stopTime){
bufferNext(thisPacket);
uint64_t lastBuffered = 0;
while (thisPacket && thisPacket.getTime() < stopTime) {
if (thisPacket.getTime() >= lastBuffered){
bufferNext(thisPacket);
lastBuffered = thisPacket.getTime();
}
getNext();
}
bufferFinalize(track);