Merge branch 'development' into LTS_development
# Conflicts: # src/input/input_buffer.cpp
This commit is contained in:
commit
ccf1221d48
1 changed files with 10 additions and 4 deletions
|
@ -310,13 +310,19 @@ namespace Mist {
|
|||
}
|
||||
for (std::map<unsigned int, DTSC::Track>::iterator it = myMeta.tracks.begin(); it != myMeta.tracks.end(); it++){
|
||||
//if not updated for an entire buffer duration, or last updated track and this track differ by an entire buffer duration, erase the track.
|
||||
if ((time - lastUpdated[it->first]) > (bufferTime / 1000) || (compareLast && (time - lastUpdated[it->first]) > 5 && ((myMeta.tracks[it->first].firstms - compareLast) > bufferTime || (compareFirst - myMeta.tracks[it->first].lastms) > bufferTime))){
|
||||
if ((long long int)(time - lastUpdated[it->first]) > (long long int)(bufferTime / 1000) ||
|
||||
(compareLast && (long long int)(time - lastUpdated[it->first]) > 5 && (
|
||||
(compareLast < it->second.firstms && (long long int)(it->second.firstms - compareLast) > bufferTime)
|
||||
||
|
||||
(compareFirst > it->second.lastms && (long long int)(compareFirst - it->second.lastms) > bufferTime)
|
||||
))
|
||||
){
|
||||
unsigned int tid = it->first;
|
||||
//erase this track
|
||||
if ((time - lastUpdated[it->first]) > (bufferTime / 1000)){
|
||||
INFO_MSG("Erasing track %d because not updated for %ds (> %ds)", it->first, (time - lastUpdated[it->first]), bufferTime / 1000);
|
||||
if ((long long int)(time - lastUpdated[it->first]) > (long long int)(bufferTime / 1000)){
|
||||
INFO_MSG("Erasing track %d because not updated for %ds (> %ds)", it->first, (long long int)(time - lastUpdated[it->first]), (long long int)(bufferTime / 1000));
|
||||
}else{
|
||||
INFO_MSG("Erasing inactive track %d because it contains data (%ds - %ds), while active tracks are (%ds - %ds), which is more than %ds seconds apart.", it->second.firstms / 1000, it->second.lastms / 1000, compareFirst/1000, compareLast/1000, bufferTime / 1000);
|
||||
INFO_MSG("Erasing inactive track %u because it was inactive for 5+ seconds and contains data (%us - %us), while active tracks are (%us - %us), which is more than %us seconds apart.", it->first, it->second.firstms / 1000, it->second.lastms / 1000, compareFirst/1000, compareLast/1000, bufferTime / 1000);
|
||||
}
|
||||
lastUpdated.erase(tid);
|
||||
/// \todo Consider replacing with eraseTrackDataPages(it->first)?
|
||||
|
|
Loading…
Add table
Reference in a new issue