tsdemux: do not show continuity error in first seconds of streaming

Most hardware stabilizes things after tuning and these messages are
irritating.
This commit is contained in:
Jaroslav Kysela 2014-06-11 19:02:21 +02:00
parent c05c643737
commit 0051f72b78
3 changed files with 11 additions and 3 deletions

View file

@ -69,9 +69,11 @@ ts_recv_packet0
if(tsb[3] & 0x10) {
cc = tsb[3] & 0xf;
if(st->es_cc != -1 && cc != st->es_cc) {
/* Incorrect CC */
limitedlog(&st->es_loglimit_cc, "TS", service_component_nicename(st),
"Continuity counter error");
/* Let the hardware to stabilize */
if (t->s_start_time + 1 < dispatch_clock)
/* Incorrect CC */
limitedlog(&st->es_loglimit_cc, "TS", service_component_nicename(st),
"Continuity counter error");
avgstat_add(&t->s_cc_errors, 1, dispatch_clock);
avgstat_add(&st->es_cc_errors, 1, dispatch_clock);

View file

@ -489,6 +489,7 @@ service_start(service_t *t, int instance)
assert(t->s_status != SERVICE_RUNNING);
t->s_streaming_status = 0;
t->s_scrambled_seen = 0;
t->s_start_time = dispatch_clock;
service_build_filter(t);

View file

@ -335,6 +335,11 @@ typedef struct service {
* will be set to TRANSPORT_STATUS_NO_INPUT
*/
gtimer_t s_receive_timer;
/**
* Stream start time
*/
time_t s_start_time;
/*********************************************************
*