From 9a1fb0873f0341e1e7136572cdc05c3a080bd9f4 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Wed, 6 Jul 2016 16:09:46 +0200 Subject: [PATCH] Ignore packets with invalid timestamps in VoD inputs --- src/input/input.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/input/input.cpp b/src/input/input.cpp index 1620f834..265a54d7 100644 --- a/src/input/input.cpp +++ b/src/input/input.cpp @@ -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);