zapit/src/scansdt.cpp,

zapit/src/scannit.cpp,
zapit/src/scanbat.cpp: stop section reading after 5th repeated section
This commit is contained in:
[CST] Focus
2012-04-19 10:57:00 +04:00
parent 2f67821e5f
commit 9d804e0ff0
3 changed files with 16 additions and 4 deletions

View File

@@ -124,8 +124,12 @@ bool CBat::Read()
#ifdef DEBUG_BAT
printf("[BAT] section %X last %X -> %s\n", secnum, buffer[7], secdone[secnum] ? "skip" : "use");
#endif
if(secdone[secnum])
continue;
if(secdone[secnum]) {
secdone[secnum]++;
if(secdone[secnum] >= 5)
break;
continue;
}
secdone[secnum] = 1;
sectotal++;

View File

@@ -135,8 +135,12 @@ bool CNit::Read()
#ifdef DEBUG_NIT
printf("[NIT] section %X last %X -> %s\n", secnum, buffer[7], secdone[nit_index][secnum] ? "skip" : "use");
#endif
if(secdone[nit_index][secnum]) // mark sec XX done
if(secdone[nit_index][secnum]) { // mark sec XX done
secdone[nit_index][secnum]++;
if(secdone[nit_index][secnum] >= 5)
break;
continue;
}
secdone[nit_index][secnum] = 1;
sectotal[nit_index]++;

View File

@@ -120,8 +120,12 @@ _repeat:
#ifdef DEBUG_SDT
printf("[SDT] section %X last %X tsid 0x%x onid 0x%x -> %s\n", buffer[6], buffer[7], transport_stream_id, original_network_id, secdone[secnum] ? "skip" : "use");
#endif
if(secdone[secnum])
if(secdone[secnum]) {
secdone[secnum]++;
if(secdone[secnum] >= 5)
break;
continue;
}
secdone[secnum] = 1;
sectotal++;