Merge branch 'development' into LTS_development
This commit is contained in:
commit
57e40fe921
3 changed files with 8 additions and 0 deletions
|
@ -302,6 +302,7 @@ namespace DTSC {
|
||||||
Track();
|
Track();
|
||||||
Track(JSON::Value & trackRef);
|
Track(JSON::Value & trackRef);
|
||||||
Track(Scan & trackRef);
|
Track(Scan & trackRef);
|
||||||
|
void clearParts();
|
||||||
|
|
||||||
inline operator bool() const {
|
inline operator bool() const {
|
||||||
return (parts.size() && keySizes.size() && (keySizes.size() == keys.size()));
|
return (parts.size() && keySizes.size() && (keySizes.size() == keys.size()));
|
||||||
|
|
|
@ -1351,6 +1351,10 @@ namespace DTSC {
|
||||||
fragments.rbegin()->setSize(fragments.rbegin()->getSize() + packDataSize);
|
fragments.rbegin()->setSize(fragments.rbegin()->getSize() + packDataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Track::clearParts(){
|
||||||
|
while (fragments.size() > 1){removeFirstKey();}
|
||||||
|
}
|
||||||
|
|
||||||
/// Removes the first buffered key, including any fragments it was part of
|
/// Removes the first buffered key, including any fragments it was part of
|
||||||
void Track::removeFirstKey(){
|
void Track::removeFirstKey(){
|
||||||
HIGH_MSG("Erasing key %d:%lu", trackID, keys[0].getNumber());
|
HIGH_MSG("Erasing key %d:%lu", trackID, keys[0].getNumber());
|
||||||
|
|
|
@ -381,6 +381,9 @@ namespace Mist {
|
||||||
|
|
||||||
if (myMeta.live){
|
if (myMeta.live){
|
||||||
myMeta.update(pack);
|
myMeta.update(pack);
|
||||||
|
for (std::map<unsigned int, DTSC::Track>::iterator it = myMeta.tracks.begin(); it != myMeta.tracks.end(); it++) {
|
||||||
|
it->second.clearParts();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//End of brain melt
|
//End of brain melt
|
||||||
|
|
Loading…
Add table
Reference in a new issue