Opened 5 months ago

Last modified 3 weeks ago

#13455 assigned Bug Report - General

EIT/ETT broadcast data; title/description mismatch

Reported by: Roanld L Humble Owned by: Klaas de Waal
Priority: minor Milestone: 31.0
Component: MythTV - EIT Version: v30-fixes
Severity: medium Keywords:
Cc: Stuart Auchterlonie Ticket locked: no


Ticket #11476 closed in early 2018. Title(EIT)/Description(ETT) mismatches occur for me (ATSC over-the-air broadcast/United States) with v30 (compiled and RPMFusion). The mismatches become more numerous with time.

My libmythtv.160508.v0.28.patch and its predecessors have worked for me for 5-6 years now (though it does not conform to standard) by disabling ETT caching. This patch patches v30. I know of no problems generated by use of this patch. If I thought there was a hope some piece of this patch to be merged, I would make it conform to standard.

It would appear that the use of the ATSC <EIT ETT> parameter version_number will have to be used if title/description matching and ETT caching are to coexist.

Attachments (2)

libmythtv.190506.v0.30.patch (2.9 KB) - added by Roanld L Humble 5 months ago.
EIT/ETT Title/Description? mismatch
20190919-atsc-eit-ett-13455-v0.patch (6.1 KB) - added by Klaas de Waal 4 weeks ago.
Remove ETT caching; process ETT event only after the corresponding EIT event has been received.

Download all attachments as: .zip

Change History (6)

Changed 5 months ago by Roanld L Humble

EIT/ETT Title/Description? mismatch

comment:1 Changed 5 months ago by Roanld L Humble

libmythtv.190506.v0.30.patch is the patch used to patch the RPMFusion source code (commit: 20190404git8e50fcf60b). Other than path changes to make the patch applicable to the top of the source tree, it is the same as libmythtv.160508.v0.28.patch. Perhaps it might be cherry-picked by the developers for code relevant to this problem.

comment:2 Changed 4 weeks ago by Klaas de Waal

Cc: Stuart Auchterlonie added
Milestone: needs_triage31.0
Owner: changed from Karl Egly to Klaas de Waal
Status: newassigned

The patch libmythtv.190506.v0.30.patch​ consists of two different parts, possibly relating to two different issues.

Part 1: Adding mutex myLock in TVRec::run

TVRec::run is started once for each capturecard. The additional lock enforces that TVRec::run cannot run twice on the same capturecard. However, this should never happen and if that happens this needs further investigation. To test if it called while already running please add some error checking code to TVRec::run like this:

/// \brief Event handling method, contains event loop.
void TVRec::run(void)
    // KdW test ticket #13455
    if (m_myLock.tryLock(0))
        LOG(VB_GENERAL, LOG_INFO, LOC + "#13455 TVRec::run GOOD");
        LOG(VB_GENERAL, LOG_ERR, LOC + "#13455 TVRec::run ERROR called while running");
    QMutexLocker mylocker(&m_myLock);

    QMutexLocker lock(&m_stateChangeLock);

If errors do happen then please run mythbackend under gdb, set a breakpoint in the line with "TVRec::run ERROR" and make a backtrace with gdb when the breakpoint is hit. N.B. Code example uses the m_ prefix as is now standard in the master code.

Part 2: Caching of ETT events

The patch can be described as follows:

Accept ETT events only after the corresponding EIT event has been received.

This does make sense as it is unlikely that an ETT event, containing additional data for an EIT event, is sent before the corresponding EIT event has been sent. There is the possibility that mythbackend starts to receive just after the EIT event and just before the ETT event but that is a corner case that does not need to be coded for, given the high repetition rate of these events.

comment:3 Changed 4 weeks ago by Klaas de Waal

Attached is patch 20190919-atsc-eit-eit-13455-v0.patch which removes the ETT caching completely. This patch applies to the current master.

The idea is that the first ETT event that is received after the EIT event is received will be used to make the EIT event complete. This ordering means that the ETT event has always at least the same table version as the EIT event.

Note that another possible reason for the problems encountered with EIT and ETT caching is the scope of the event ID, as described in the ATSC documentation A/65:2013, page 40:

For a particular virtual channel, an event_id identifies uniquely each
of the events programmed for the 3-hour interval of an EIT.

This means that the event ID for the same program can change 8 times per day.....

The original code also had, the way I read it, a memory leak in the case that an expected ETT event was not received. This should now be fixed.

Please note that this patch is not tested at all so there can be a few iterations needed to make it perfect. It would be greatly appreciated if this patch could be tested in ATSC country.

Changed 4 weeks ago by Klaas de Waal

Remove ETT caching; process ETT event only after the corresponding EIT event has been received.

comment:4 Changed 3 weeks ago by Klaas de Waal <kdewaal@…>

In fe0c80927f/mythtv:

Remove ATSC ETT caching

Process ATSC ETT events only after the corresponding EIT event,
as identified by the event ID, has been received.
This solves title/description mismatches in guide data.
Bug reported and bug fix tested for several years by Roanld L Humble.
Thanks for the perseverance in reporting and testing this bug.

Also fix of a memory leak in the case where EIT events are cached
awaiting a matching ETT event but the ETT event does never arrive.

Refs #13455

Note: See TracTickets for help on using tickets.