Opened 14 years ago

Closed 14 years ago

#538 closed defect (fixed)

DVB EIT-event language selection support bug

Reported by: tomi.orava@… Owned by: danielk
Priority: minor Milestone: 0.19
Component: mythtv Version: head
Severity: low Keywords:
Cc: Ticket locked: no


Short Description:

The EIT-event (program description) language selection doesn't work correctly in all cases.

Long description:

In siparser.cpp there is this "LanguagePriority?"-map which is used whenever people want to predefine which language they want to use for the EIT-events. The way it works now is that people in networks which support multiple languages in program descriptions, must predefine ALL the languages available in the network into the PreferredLanguages?-variable in settings table, otherwise they might still see events with incorrect languages on the screen.

In siparser.cpp:

Get a list of wanted languages and set up their priorities

(Lowest number wins)

QStringList langPref = iso639_get_language_list();

QStringList::Iterator plit;

int prio = 1;

for (plit = langPref.begin(); plit != langPref.end(); ++plit) {

SIPARSER(QString("Added preferred language %1 with priority %2")


LanguagePriority?[*plit] = prio++;


This initialization doesn't make sure that all available language codes have a predefined prio-value which is ABOVE the user set "most wanted" languages.

Thefore in the original code in ParseDVBEIT() it is very well possible that a first incoming event of some table is of unwanted language type (in this case "swedish", swe) and thefore the line:

int prio = LanguagePriority?[lang];

gives the event a priority of 0, instead of something above the values of my preferred languages. As the current event is the first one, the variable bd4D_prio has the initialized value of -1 and the event is considered OK. Obviously the following events of language "fin or eng" (with prio values 1 and 2) are unable to override the unwanted swedish event information.

The included patch is a hack, as it doesn't take care of a (most common) situation where the user has not predefined any languages in settings-table. However, I'm quite sure that it describes the problem reasonably well.

Attachments (1)

eit.patch (1.9 KB) - added by tomi.orava@… 14 years ago.
Crude patch to describe the minor EIT language selection problem.

Download all attachments as: .zip

Change History (3)

Changed 14 years ago by tomi.orava@…

Attachment: eit.patch added

Crude patch to describe the minor EIT language selection problem.

comment:1 Changed 14 years ago by danielk

Milestone: 0.19
Owner: changed from Isaac Richards to danielk
Version: head

comment:2 Changed 14 years ago by danielk

Resolution: fixed
Status: newclosed

(In [7628]) Fixes #538.

I didn't use the attached patch.

Instead I created a SIParser::GetLanguagePriority?() function which inserts unknown languages with less desirability than the languages already in the list.

The old code inserts unknown languages with as more desirable EIT languages than the languages the user has specified as preferred.

Note: See TracTickets for help on using tickets.