From 12b74e6ef3f9d1aae98e909635f5a2c231133b98 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). --- 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,