diff --git a/src/ccextractor.c b/src/ccextractor.c index b98b7980..f6e6178a 100644 --- a/src/ccextractor.c +++ b/src/ccextractor.c @@ -31,7 +31,7 @@ int cb_field1, cb_field2, cb_708; int saw_caption_block; int pts_set; //0 = No, 1 = received, 2 = min_pts set - +unsigned long long max_dif = 5; unsigned pts_big_change; int MPEG_CLOCK_FREQ = 90000; // This "constant" is part of the standard diff --git a/src/ccextractor.h b/src/ccextractor.h index 3198f21d..93e0de35 100644 --- a/src/ccextractor.h +++ b/src/ccextractor.h @@ -418,6 +418,7 @@ extern int startbytes_avail; // Needs to be able to hold -1 result. extern unsigned char *pesheaderbuf; extern int pts_set; //0 = No, 1 = received, 2 = min_pts set +extern unsigned long long max_dif; extern int MPEG_CLOCK_FREQ; // This is part of the standard diff --git a/src/general_loop.c b/src/general_loop.c index 5d37575d..cf45088d 100644 --- a/src/general_loop.c +++ b/src/general_loop.c @@ -603,6 +603,7 @@ void general_loop(void) { int out_size = 0; dvbsub_decode(cxx_dvb_context,NULL,&out_size,buffer + 2,inbuf); + set_fts(); got = inbuf; } else if (ccx_bufferdatatype == CCX_PES) diff --git a/src/timing.c b/src/timing.c index c01955aa..2d2b7aa6 100644 --- a/src/timing.c +++ b/src/timing.c @@ -44,7 +44,7 @@ void set_fts(void) break; } - if (dif < -0.2 || dif >=5 ) + if (dif < -0.2 || dif >=max_dif ) { // ATSC specs: More than 3501 ms means missing component mprint ("\nWarning: Reference clock has changed abruptly (%d seconds filepos=%lld), attempting to synchronize\n", (int) dif, past); diff --git a/src/ts_tables.c b/src/ts_tables.c index bb65daab..515b720b 100644 --- a/src/ts_tables.c +++ b/src/ts_tables.c @@ -238,6 +238,7 @@ int parse_PMT (int pos) dvbsub_set_write(cxx_dvb_context,&wbout1); ccx_options.ts_cappid = newcappid = elementary_PID; cap_stream_type = newcap_stream_type = ccx_stream_type; + max_dif = 10; } } }