[mythtv-commits] Ticket #538: DVB EIT-event language selection support bug

MythTV mythtv at cvs.mythtv.org
Fri Oct 28 02:23:44 EDT 2005


#538: DVB EIT-event language selection support bug
-------------------------------------------+--------------------------------
 Reporter:  tomi.orava at ncircle.nullnet.fi  |       Owner:  ijr
     Type:  defect                         |      Status:  new
 Priority:  minor                          |   Milestone:     
Component:  mythtv                         |     Version:     
 Severity:  low                            |  -------------------------------------------+--------------------------------
 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")
        .arg(*plit).arg(prio));
     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.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/538>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list