Ignore excess samples with the same timestamp.

With a time based sample interval, the maximum number of samples for a
single timestamp should be constant. However in practice some devices
occasionally store one or more additional samples with the same
timestamp.

Ignoring those excess samples, allows the parser to proceed, while still
preserving the strict time based interval for the application.
This commit is contained in:
Jef Driesen 2014-07-08 21:18:41 +02:00
parent 77d53813bd
commit eb036357a6

View File

@ -281,8 +281,9 @@ oceanic_vtpro_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
return DC_STATUS_DATAFORMAT;
}
if (i >= count) {
ERROR (abstract->context, "Unexpected number of samples with the same timestamp.");
return DC_STATUS_DATAFORMAT;
WARNING (abstract->context, "Unexpected sample with the same timestamp ignored.");
offset += PAGESIZE / 2;
continue;
}
}