int8_t mt_cc;
+ time_t mt_last_perr; // last printer error
+ size_t mt_errors; // total number of table errors
+
mpegts_psi_section_t mt_sect;
struct mpegts_table_mux_cb *mt_mux_cb;
len = ((sec[1] & 0x0f) << 8) | sec[2];
if (tid == 0x72) { /* stuffing section */
- if (len != r - 3)
- tvhwarn(mt->mt_name, "stuffing found with trailing data (len %i, total %zi)", len, r);
+ if (len != r - 3) {
+ mt->mt_errors++;
+ if (mt->mt_last_perr + 10 < dispatch_clock) {
+ tvhwarn(mt->mt_name, "stuffing found with trailing data "
+ "(len %i, total %zi, errors %zi)",
+ len, r, mt->mt_errors);
+ mt->mt_last_perr = dispatch_clock;
+ }
+ }
dvb_table_reset(mt);
return;
}
/* It seems some hardware (or is it the dvb API?) does not
honour the DMX_CHECK_CRC flag, so we check it again */
if(chkcrc && tvh_crc32(sec, r, 0xffffffff)) {
- tvhwarn(mt->mt_name, "invalid checksum (len %zi)", r);
+ mt->mt_errors++;
+ if (mt->mt_last_perr + 10 < dispatch_clock) {
+ tvhwarn(mt->mt_name, "invalid checksum (len %zi, errors %zi)",
+ r, mt->mt_errors);
+ mt->mt_last_perr = dispatch_clock;
+ }
return;
}