summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2019-05-20 09:55:22 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2019-05-20 09:55:22 +0200
commitabdab188079e7db7ec22f18171ac300b16e8e8a9 (patch)
treeff2ad5613e63c60e322307b9a803c3578877d673
parent12d8ef5a21d73ae0b7e656d2dd8f9ead5177bf56 (diff)
downloadvdr-abdab188079e7db7ec22f18171ac300b16e8e8a9.tar.gz
vdr-abdab188079e7db7ec22f18171ac300b16e8e8a9.tar.bz2
Added a workaround for broadcasters who set an event to status "not running" where this is inappropriate; implicitly setting events to "not running" is now also logged
-rw-r--r--HISTORY4
-rw-r--r--eit.c34
-rw-r--r--epg.c4
3 files changed, 36 insertions, 6 deletions
diff --git a/HISTORY b/HISTORY
index bb3d7039..cc6ad282 100644
--- a/HISTORY
+++ b/HISTORY
@@ -9348,7 +9348,7 @@ Video Disk Recorder Revision History
Senzel).
- Official release.
-2019-05-13: Version 2.4.1
+2019-05-20: Version 2.4.1
- Fixed handling the tfRecording flag in the SVDRP commands MODT and UPDT (reported
by Johann Friedrichs).
@@ -9405,3 +9405,5 @@ Video Disk Recorder Revision History
- Fixed a compiler warning in cIndexFile::ConvertToPes() and added __attribute__((packed))
to tIndexPes and tIndexTs (suggested by Helmut Binder).
- Fixed handling repeat function for keyboards.
+- Added a workaround for broadcasters who set an event to status "not running" where
+ this is inappropriate; implicitly setting events to "not running" is now also logged.
diff --git a/eit.c b/eit.c
index e4a3ec6e..72a45e5c 100644
--- a/eit.c
+++ b/eit.c
@@ -8,7 +8,7 @@
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
* Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>.
*
- * $Id: eit.c 4.6 2018/11/15 16:33:58 kls Exp $
+ * $Id: eit.c 4.7 2019/05/20 09:55:22 kls Exp $
*/
#include "eit.h"
@@ -20,6 +20,8 @@
#define VALID_TIME (31536000 * 2) // two years
+#define DBGEIT 0
+
// --- cEIT ------------------------------------------------------------------
class cEIT : public SI::EIT {
@@ -130,8 +132,34 @@ cEIT::cEIT(cSectionSyncerHash &SectionSyncerHash, int Source, u_char Tid, const
if (pEvent->TableID() > 0x4E) // for backwards compatibility, table ids less than 0x4E are never overwritten
pEvent->SetTableID(Tid);
if (Tid == 0x4E) { // we trust only the present/following info on the actual TS
- if (SiEitEvent.getRunningStatus() >= SI::RunningStatusNotRunning)
- pSchedule->SetRunningStatus(pEvent, SiEitEvent.getRunningStatus(), Channel);
+ int RunningStatus = SiEitEvent.getRunningStatus();
+#if DBGEIT
+ if (Process)
+ dsyslog("channel %d (%s) event %s status %d (raw data from '%s' section)", Channel->Number(), Channel->Name(), *pEvent->ToDescr(), RunningStatus, getSectionNumber() ? "following" : "present");
+#endif
+ if (RunningStatus >= SI::RunningStatusNotRunning) {
+ // Workaround for broadcasters who set an event to status "not running" where
+ // this is inappropriate:
+ if (RunningStatus != pEvent->RunningStatus()) { // if the running status of the event has changed...
+ if (RunningStatus == SI::RunningStatusNotRunning) { // ...and the new status is "not running"...
+ int OverrideStatus = -1;
+ if (getSectionNumber() == 0) { // ...and if this the "present" event...
+ if (pEvent->RunningStatus() == SI::RunningStatusPausing) // ...and if the event has already been set to "pausing"...
+ OverrideStatus = SI::RunningStatusPausing; // ...then we ignore the faulty new status and stay with "pausing"
+ }
+ else // ...and if this is the "following" event...
+ OverrideStatus = SI::RunningStatusUndefined; // ...then we ignore the faulty new status and fall back to "undefined"
+ if (OverrideStatus >= 0) {
+#if DBGEIT
+ if (Process)
+ dsyslog("channel %d (%s) event %s status %d (ignored status %d from '%s' section)", Channel->Number(), Channel->Name(), *pEvent->ToDescr(), OverrideStatus, RunningStatus, getSectionNumber() ? "following" : "present");
+#endif
+ RunningStatus = OverrideStatus;
+ }
+ }
+ }
+ pSchedule->SetRunningStatus(pEvent, RunningStatus, Channel);
+ }
if (!Process)
continue;
}
diff --git a/epg.c b/epg.c
index 486844e5..5d2980c9 100644
--- a/epg.c
+++ b/epg.c
@@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
*
- * $Id: epg.c 4.8 2017/05/28 13:08:09 kls Exp $
+ * $Id: epg.c 4.9 2019/05/20 09:55:22 kls Exp $
*/
#include "epg.h"
@@ -1025,7 +1025,7 @@ void cSchedule::SetRunningStatus(cEvent *Event, int RunningStatus, const cChanne
}
}
else if (RunningStatus >= SI::RunningStatusPausing && p->StartTime() < Event->StartTime())
- p->SetRunningStatus(SI::RunningStatusNotRunning);
+ p->SetRunningStatus(SI::RunningStatusNotRunning, Channel);
if (p->RunningStatus() >= SI::RunningStatusPausing)
hasRunning = true;
}