[mythtv] [mythtv-commits] Ticket #1669: Index error in myth_catogory_type_to_string in [9671]

Daniel Kristjansson danielk at cuymedia.net
Wed Apr 12 00:54:50 UTC 2006


On Wed, 2006-04-12 at 02:08 +0200, Janne Grunau wrote:
> Any thoughts on on #1668? I'm not sure if my patches does what you 
> intended. At least it works for me. But I have only monolingual EIT 
> afaik.

The intention of those functions was to find the descriptor[s]
in the language with the highest priority. If none of the 
descriptors are in a language in our priority list then it
should pick the first one in any language and add that language
to our priority list (we want the first one because that is
probably the dominant language, we want to default to Finish
in Finland, not Swedish). The problem was that I copy-n-pasted
some code when I switched from using an iterator to an index
and forgot to fix the index in the loop.

Some of the complication in that piece of code comes from some
oddities about the ISO 639 standard, such as allowing two codes
for the same language, "ger" && "deu" are both the official code
for German. Plus, for efficiency we construct the DVB extended
event descriptor list after determining the language, so as to
avoid constructing the list multiple times if our desired
language is the one transmitted last in the descriptor list.

-- Daniel



More information about the mythtv-dev mailing list