Fix for TS Input CPU Usage
This commit is contained in:
parent
8567e5192a
commit
01472ca88d
2 changed files with 40 additions and 34 deletions
|
@ -211,6 +211,8 @@ namespace Mist {
|
|||
if (thisPacket) {
|
||||
continueNegotiate(thisPacket.getTrackId());
|
||||
bufferLivePacket(thisPacket);
|
||||
} else {
|
||||
Util::sleep(100);
|
||||
}
|
||||
getNext();
|
||||
userClient.keepAlive();
|
||||
|
|
|
@ -177,6 +177,10 @@ namespace Mist {
|
|||
return;
|
||||
}
|
||||
unsigned long mapTid = trackMap[tid];
|
||||
if (!pagesByTrack.count(tid)){
|
||||
//The buffer does not control the datapages, indicated by no pagesByTrack entry.
|
||||
return;
|
||||
}
|
||||
//If the given pagenumber is not a valid page on this track, do nothing
|
||||
if (!pagesByTrack[tid].count(pageNumber)){
|
||||
INFO_MSG("Can't remove page %lu on track %lu~>%lu as it is not a valid page number.", pageNumber, tid, mapTid);
|
||||
|
@ -192,7 +196,7 @@ namespace Mist {
|
|||
#else
|
||||
toErase.init(pageName, pagesByTrack[tid][pageNumber].dataSize, false);
|
||||
#endif
|
||||
//Set the master flag so that the page will be destoryed once it leaves scope
|
||||
//Set the master flag so that the page will be destroyed once it leaves scope
|
||||
#if defined(__CYGWIN__) || defined(_WIN32)
|
||||
IPC::releasePage(pageName);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue