diff --git a/src/output/output.cpp b/src/output/output.cpp index eb1ba702..29192081 100644 --- a/src/output/output.cpp +++ b/src/output/output.cpp @@ -847,7 +847,7 @@ namespace Mist { thisPacket.reInit(curPage[nxt.tid].mapped + nxt.offset, 0, true); if (thisPacket){ if (thisPacket.getTime() != nxt.time && nxt.time){ - DEBUG_MSG(DLVL_MEDIUM, "ACTUALLY Loaded track %ld (next=%lu), %llu ms", thisPacket.getTrackId(), nxtKeyNum[nxt.tid], thisPacket.getTime()); + WARN_MSG("Loaded track %ld@%llu instead of %ld@%llu", thisPacket.getTrackId(), thisPacket.getTime(), nxt.tid, nxt.time); } if ((myMeta.tracks[nxt.tid].type == "video" && thisPacket.getFlag("keyframe")) || (++nonVideoCount % 30 == 0)){ if (myMeta.live){ @@ -876,11 +876,11 @@ namespace Mist { } while(!completeKeyReady && timeoutTries>0){ completeKeyReady = true; - for (std::map::iterator it = myMeta.tracks.begin(); it != myMeta.tracks.end(); it++){ - if (!it->second.keys.size() || it->second.keys.rbegin()->getTime() + it->second.keys.rbegin()->getLength() <= nxt.time ){ - completeKeyReady = false; - break; - } + for (std::set::iterator it = selectedTracks.begin(); it != selectedTracks.end(); it++){ + if (!myMeta.tracks[*it].keys.size() || myMeta.tracks[*it].keys.rbegin()->getTime() + myMeta.tracks[*it].keys.rbegin()->getLength() <= nxt.time ){ + completeKeyReady = false; + break; + } } if (!completeKeyReady){ if (completeKeyReadyTimeOut){