From: Adam Sutton Date: Sun, 29 Dec 2013 23:38:31 +0000 (+0000) Subject: mpegts: ensure init scan completes properly X-Git-Tag: v4.1~2309 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aea03049a0785d1bb9da417b2b36d1fbebdf679d;p=thirdparty%2Ftvheadend.git mpegts: ensure init scan completes properly I was not properly checking completion on table completion and CAT processing was not marking that table as complete (ever). --- diff --git a/src/input/mpegts/dvb_psi.c b/src/input/mpegts/dvb_psi.c index 606ec082c..c6a98c6c1 100644 --- a/src/input/mpegts/dvb_psi.c +++ b/src/input/mpegts/dvb_psi.c @@ -698,7 +698,9 @@ dvb_cat_callback ptr += dlen; len -= dlen; } - return 0; + + /* Finish */ + return dvb_table_end(mt, st, sect); } /* diff --git a/src/input/mpegts/mpegts_mux.c b/src/input/mpegts/mpegts_mux.c index 400866dd5..17c02cceb 100644 --- a/src/input/mpegts/mpegts_mux.c +++ b/src/input/mpegts/mpegts_mux.c @@ -658,6 +658,7 @@ mpegts_mux_initial_scan_timeout ( void *aux ) /* Pending tables (another 20s - bit arbitrary) */ } else if (q) { + tvhinfo("mepgts", "%s - initial scan needs more time", buf); gtimer_arm(&mm->mm_initial_scan_timeout, mpegts_mux_initial_scan_timeout, mm, 20); return; diff --git a/src/input/mpegts/mpegts_table.c b/src/input/mpegts/mpegts_table.c index 4475771c1..d01e01396 100644 --- a/src/input/mpegts/mpegts_table.c +++ b/src/input/mpegts/mpegts_table.c @@ -30,7 +30,8 @@ mpegts_table_fastswitch ( mpegts_mux_t *mm ) return; LIST_FOREACH(mt, &mm->mm_tables, mt_link) { - if((mt->mt_flags & MT_QUICKREQ) && mt->mt_count == 0) + if (!(mt->mt_flags & MT_QUICKREQ)) continue; + if(!mt->mt_complete) return; }