snippets: fix to the group matching code

This commit is contained in:
Jean-Francois Dockes
2018-01-03 15:53:04 +01:00
parent 567401233a
commit a35de1ef1e
2 changed files with 20 additions and 8 deletions
+6 -2
View File
@@ -261,13 +261,17 @@ public:
// always start the search where we previously stopped).
auto fragit = m_fragments.begin();
for (const auto& grpmatch : tboffs) {
while (fragit->start > grpmatch.offs.first) {
LOGDEB2("LOOKING FOR FRAGMENT: group: " << grpmatch.offs.first <<
"-" << grpmatch.offs.second << " curfrag " <<
fragit->start << "-" << fragit->stop << endl);
while (fragit->stop < grpmatch.offs.first) {
fragit++;
if (fragit == m_fragments.end()) {
return;
}
}
if (fragit->stop >= grpmatch.offs.second) {
if (fragit->start <= grpmatch.offs.first &&
fragit->stop >= grpmatch.offs.second) {
// grp in frag
fragit->coef += 10.0;
}