diff --git a/src/output/output_progressive_mp4.cpp b/src/output/output_progressive_mp4.cpp index bbc308bd..5c8ffa3c 100644 --- a/src/output/output_progressive_mp4.cpp +++ b/src/output/output_progressive_mp4.cpp @@ -863,11 +863,11 @@ namespace Mist { //if header needed if (!partListLength || partListSent >= partListLength) { DTSC::Track & mainTrk = myMeta.tracks[vidTrack]; - // The extra 600ms here is for the metadata sync delay. + // The extra 2000ms here is for the metadata sync delay. // It can be removed once we get rid of that. - // (sync delay = ~1s, minimum lookAhead is 420ms -> ~600ms extra needed) + // (sync delay = ~1s, minimum lookAhead is 420ms -> ~600ms extra needed, we use 2000ms to be safe) if (myMeta.sourceURI.find("http://") == std::string::npos || myMeta.sourceURI.find(".m3u") == std::string::npos){ - if (fragSeqNum > 10 && thisPacket.getTime() + needsLookAhead + 600 < mainTrk.keys.rbegin()->getTime() && mainTrk.lastms - mainTrk.keys.rbegin()->getTime() > needsLookAhead){ + if (fragSeqNum > 10 && thisPacket.getTime() + needsLookAhead + 2000 < mainTrk.keys.rbegin()->getTime() && mainTrk.lastms - mainTrk.keys.rbegin()->getTime() > needsLookAhead){ INFO_MSG("Skipping forward %llums (%llu ms LA)", mainTrk.keys.rbegin()->getTime() - thisPacket.getTime(), needsLookAhead); seek(mainTrk.keys.rbegin()->getTime()); return; diff --git a/src/output/output_rtsp.cpp b/src/output/output_rtsp.cpp index 3be81d8d..a13e9fa7 100644 --- a/src/output/output_rtsp.cpp +++ b/src/output/output_rtsp.cpp @@ -96,9 +96,9 @@ namespace Mist { lastTimeSync = timestamp; updateMeta(); DTSC::Track & mainTrk = myMeta.tracks[getMainSelectedTrack()]; - // The extra 1000ms here is for the metadata sync delay. + // The extra 2000ms here is for the metadata sync delay. // It can be removed once we get rid of that. - if (timestamp + 1000 + needsLookAhead < mainTrk.keys.rbegin()->getTime() && mainTrk.lastms - mainTrk.keys.rbegin()->getTime() > needsLookAhead){ + if (timestamp + 2000 + needsLookAhead < mainTrk.keys.rbegin()->getTime() && mainTrk.lastms - mainTrk.keys.rbegin()->getTime() > needsLookAhead){ INFO_MSG("Skipping forward %llums (%llu ms LA)", mainTrk.keys.rbegin()->getTime() - thisPacket.getTime(), needsLookAhead); seek(mainTrk.keys.rbegin()->getTime()); return;