From d21b75bc1f726b328801562d9efd62381be41940 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 26 Feb 2012 13:13:33 +0100 Subject: [PATCH] spark: work around neutrino's sectionFilter() usage It seems like most of the times, timeout == 0 means "use the default timeout". However, at least with the sectionsd eit update filter and the PMT version update filter, timeout == 0 means really "no timeout" alas "infinite". Work around this by using the default timeout only if no negative filtermask is given. This fixes the "EPG on program change" (and PMT update probably, too). Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/12b74e6ef3f9d1aae98e909635f5a2c231133b98 Author: Stefan Seyfried Date: 2012-02-26 (Sun, 26 Feb 2012) ------------------ This commit was generated by Migit --- libspark/dmx.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libspark/dmx.cpp b/libspark/dmx.cpp index b853070..c22e307 100644 --- a/libspark/dmx.cpp +++ b/libspark/dmx.cpp @@ -372,7 +372,10 @@ bool cDemux::sectionFilter(unsigned short pid, const unsigned char * const filte break; // return -1; } - if (timeout == 0) + /* the negmask == NULL is a hack: the users of negmask are PMT-update + * and sectionsd EIT-Version change. And they really want no timeout + * if timeout == 0 instead of "default timeout" */ + if (timeout == 0 && negmask == NULL) s_flt.timeout = to; lt_debug("%s #%d pid:0x%04hx fd:%d type:%s len:%d to:%d flags:%x flt[0]:%02x\n", __func__, num,