Fix track dropping code not always dropping the userSelect when it should/could
This commit is contained in:
parent
11f19c77eb
commit
c6078afc24
1 changed files with 16 additions and 10 deletions
|
@ -2015,12 +2015,10 @@ namespace Mist{
|
||||||
// depending on whether this is probably bad and the current debug level, print a message
|
// depending on whether this is probably bad and the current debug level, print a message
|
||||||
size_t printLevel = (probablyBad ? DLVL_WARN : DLVL_INFO);
|
size_t printLevel = (probablyBad ? DLVL_WARN : DLVL_INFO);
|
||||||
//The rest of the operations depends on userSelect, so we ignore it if it doesn't exist.
|
//The rest of the operations depends on userSelect, so we ignore it if it doesn't exist.
|
||||||
|
if (!userSelect.count(trackId)){
|
||||||
if (!M || !M.getValidTracks().count(trackId)){
|
if (!M || !M.getValidTracks().count(trackId)){
|
||||||
DEBUG_MSG(printLevel, "Dropping invalid track %zu: %s", trackId, reason.c_str());
|
DEBUG_MSG(printLevel, "Dropping invalid track %zu: %s", trackId, reason.c_str());
|
||||||
return;
|
}else if (M.hasEmbeddedFrames(trackId)){
|
||||||
}
|
|
||||||
if (!userSelect.count(trackId)){
|
|
||||||
if (M.hasEmbeddedFrames(trackId)){
|
|
||||||
DEBUG_MSG(printLevel, "Dropping %s track %zu (raw): %s", meta.getCodec(trackId).c_str(), trackId, reason.c_str());
|
DEBUG_MSG(printLevel, "Dropping %s track %zu (raw): %s", meta.getCodec(trackId).c_str(), trackId, reason.c_str());
|
||||||
}else{
|
}else{
|
||||||
DEBUG_MSG(printLevel, "Dropping %s track %zu (lastP=%" PRIu64 "): %s",
|
DEBUG_MSG(printLevel, "Dropping %s track %zu (lastP=%" PRIu64 "): %s",
|
||||||
|
@ -2033,14 +2031,22 @@ namespace Mist{
|
||||||
DEBUG_MSG(printLevel, "Dropping %s track %zu (raw): %s", meta.getCodec(trackId).c_str(), trackId, reason.c_str());
|
DEBUG_MSG(printLevel, "Dropping %s track %zu (raw): %s", meta.getCodec(trackId).c_str(), trackId, reason.c_str());
|
||||||
}else{
|
}else{
|
||||||
if (!usr){
|
if (!usr){
|
||||||
|
if (!M || !M.getValidTracks().count(trackId)){
|
||||||
|
DEBUG_MSG(printLevel, "Dropping invalid track %zu: %s", trackId, reason.c_str());
|
||||||
|
}else{
|
||||||
DEBUG_MSG(printLevel, "Dropping %s track %zu (lastP=%" PRIu64 "): %s",
|
DEBUG_MSG(printLevel, "Dropping %s track %zu (lastP=%" PRIu64 "): %s",
|
||||||
meta.getCodec(trackId).c_str(), trackId, pageNumMax(trackId), reason.c_str());
|
meta.getCodec(trackId).c_str(), trackId, pageNumMax(trackId), reason.c_str());
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if (!M || !M.getValidTracks().count(trackId)){
|
||||||
|
DEBUG_MSG(printLevel, "Dropping invalid track %zu: %s", trackId, reason.c_str());
|
||||||
}else{
|
}else{
|
||||||
DEBUG_MSG(printLevel, "Dropping %s track %zu@k%zu (nextP=%" PRIu64 ", lastP=%" PRIu64 "): %s",
|
DEBUG_MSG(printLevel, "Dropping %s track %zu@k%zu (nextP=%" PRIu64 ", lastP=%" PRIu64 "): %s",
|
||||||
meta.getCodec(trackId).c_str(), trackId, usr.getKeyNum() + 1,
|
meta.getCodec(trackId).c_str(), trackId, usr.getKeyNum() + 1,
|
||||||
pageNumForKey(trackId, usr.getKeyNum() + 1), pageNumMax(trackId), reason.c_str());
|
pageNumForKey(trackId, usr.getKeyNum() + 1), pageNumMax(trackId), reason.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
userSelect.erase(trackId);
|
userSelect.erase(trackId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue