Permalink
Browse files

[Players] Convert the language code of a selection stream to three ch…

…ars if necessary.
  • Loading branch information...
1 parent 25b1623 commit bee3993a3cdcef596c20eb5313aabe1a84d5bdb7 @ace20022 committed Feb 6, 2013
Showing with 16 additions and 0 deletions.
  1. +8 −0 xbmc/cores/dvdplayer/DVDPlayer.cpp
  2. +8 −0 xbmc/cores/omxplayer/OMXPlayer.cpp
View
8 xbmc/cores/dvdplayer/DVDPlayer.cpp
@@ -369,6 +369,14 @@ void CSelectionStreams::Update(CDVDInputStream* input, CDVDDemux* demuxer)
s.type = stream->type;
s.id = stream->iId;
s.language = stream->language;
+
+ if (s.language.length() == 2)
+ {
+ CStdString lang;
+ g_LangCodeExpander.ConvertToThreeCharCode(lang, stream->language);
+ s.language = lang;
+ }
+
s.flags = stream->flags;
s.filename = demuxer->GetFileName();
stream->GetStreamName(s.name);
View
8 xbmc/cores/omxplayer/OMXPlayer.cpp
@@ -369,6 +369,14 @@ void COMXSelectionStreams::Update(CDVDInputStream* input, CDVDDemux* demuxer)
s.type = stream->type;
s.id = stream->iId;
s.language = stream->language;
+
+ if (s.language.length() == 2)
+ {
+ CStdString lang;
+ g_LangCodeExpander.ConvertToThreeCharCode(lang, stream->language);
+ s.language = lang;
+ }
+
s.flags = stream->flags;
s.filename = demuxer->GetFileName();
stream->GetStreamName(s.name);

0 comments on commit bee3993

Please sign in to comment.