From c99e0bc3ef37a067a99a63d87d6c7eb354837e8f Mon Sep 17 00:00:00 2001 From: Erik Zandvliet Date: Tue, 20 Jan 2015 10:01:14 +0100 Subject: [PATCH] Fixed a bug where non-video pageswitches were calculated wrong --- src/output/output.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/output/output.cpp b/src/output/output.cpp index 8746a896..71af3c39 100644 --- a/src/output/output.cpp +++ b/src/output/output.cpp @@ -564,6 +564,7 @@ namespace Mist { } void Output::prepareNext(){ + static int nonVideoCount = 0; if (!sought){ if (myMeta.live){ long unsigned int mainTrack = getMainSelectedTrack(); @@ -661,7 +662,7 @@ namespace Mist { if (currentPacket.getTime() != nxt.time && nxt.time){ DEBUG_MSG(DLVL_MEDIUM, "ACTUALLY Loaded track %ld (next=%lu), %llu ms", currentPacket.getTrackId(), nxtKeyNum[nxt.tid], currentPacket.getTime()); } - if (currentPacket.getFlag("keyframe")){ + if ((myMeta.tracks[nxt.tid].type == "video" && currentPacket.getFlag("keyframe")) || (++nonVideoCount % 30 == 0)){ if (myMeta.live){ updateMeta(); }