Skip to content

Commit

Permalink
Merge pull request #678 from Montellese/dvdplayer_fix_ext_subs
Browse files Browse the repository at this point in the history
dvdplayer: prefer external over embedded subtitles with default flag set (fixes #11724)
  • Loading branch information
Montellese committed Feb 11, 2012
2 parents b8ca2fd + 886a1a4 commit a7d273f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions xbmc/cores/dvdplayer/DVDPlayer.cpp
Expand Up @@ -703,6 +703,15 @@ void CDVDPlayer::OpenDefaultStreams()
CLog::Log(LOGWARNING, "%s - failed to restore selected subtitle stream (%d)", __FUNCTION__, g_settings.m_currentVideoSettings.m_SubtitleStream);
}

// check if there are external subtitles available
for(int i = 0;i<count && !valid; i++)
{
SelectionStream& s = m_SelectionStreams.Get(STREAM_SUBTITLE, i);
if ((s.source == STREAM_SOURCE_DEMUX_SUB || s.source == STREAM_SOURCE_TEXT)
&& OpenSubtitleStream(s.id, s.source))
valid = true;
}

// select default
if(!valid
&& m_SelectionStreams.Get(STREAM_SUBTITLE, CDemuxStream::FLAG_DEFAULT, st))
Expand Down

0 comments on commit a7d273f

Please sign in to comment.