Skip to content

Commit

Permalink
[AMLPlayer] Always set the name and language fields of a subtitle/aud…
Browse files Browse the repository at this point in the history
…io stream in the getInfo methods.
  • Loading branch information
ace20022 committed Mar 18, 2013
1 parent d65cd9c commit e71cb79
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions xbmc/cores/amlplayer/AMLPlayer.cpp
Expand Up @@ -914,20 +914,9 @@ void CAMLPlayer::GetSubtitleStreamInfo(int index, SPlayerSubtitleStreamInfo &inf
if (index > (int)m_subtitle_streams.size() -1 || index < 0)
return;

if (m_subtitle_streams[m_subtitle_index]->source == STREAM_SOURCE_NONE)
{
if ( m_subtitle_streams[index]->language.size())
{
CStdString name;
g_LangCodeExpander.Lookup(name, m_subtitle_streams[index]->language);
info.name = name;
}
}
else
{
if(m_subtitle_streams[m_subtitle_index]->name.length() > 0)
info.name = m_subtitle_streams[m_subtitle_index]->name;
}
info.language = m_subtitle_streams[index]->language;
info.name = m_subtitle_streams[m_subtitle_index]->name;

if (m_log_level > 5)
CLog::Log(LOGDEBUG, "CAMLPlayer::GetSubtitleName, iStream(%d)", index);
}
Expand Down Expand Up @@ -1101,8 +1090,7 @@ void CAMLPlayer::GetAudioStreamInfo(int index, SPlayerAudioStreamInfo &info)

info.bitrate = m_audio_streams[index]->bit_rate;

if ( m_audio_streams[index]->language.size())
info.language = m_audio_streams[index]->language;
info.language = m_audio_streams[index]->language;

info.channels = m_audio_streams[index]->channel;

Expand Down

0 comments on commit e71cb79

Please sign in to comment.