Permalink
Browse files

dvdplayer: [fix] subtitle priority for multiple...

external subtitles
  • Loading branch information...
1 parent 5e111e7 commit 2a67e31cb16fd6488543993ce036e738330fde7a Thias committed Feb 21, 2014
Showing with 11 additions and 11 deletions.
  1. +11 −11 xbmc/cores/dvdplayer/DVDPlayer.cpp
@@ -168,7 +168,7 @@ class PredicateSubtitleFilter
if (preferexternal)
{
- if(ss.source == STREAM_SOURCE_DEMUX_SUB || ss.source == STREAM_SOURCE_TEXT)
+ if(STREAM_SOURCE_MASK(ss.source) == STREAM_SOURCE_DEMUX_SUB || STREAM_SOURCE_MASK(ss.source) == STREAM_SOURCE_TEXT)
return false;
}
@@ -257,11 +257,11 @@ class PredicateSubtitlePriority
if (preferextsubs)
{
- PREDICATE_RETURN(lh.source == STREAM_SOURCE_DEMUX_SUB
- , rh.source == STREAM_SOURCE_DEMUX_SUB);
+ PREDICATE_RETURN(STREAM_SOURCE_MASK(lh.source) == STREAM_SOURCE_DEMUX_SUB
+ , STREAM_SOURCE_MASK(rh.source) == STREAM_SOURCE_DEMUX_SUB);
- PREDICATE_RETURN(lh.source == STREAM_SOURCE_TEXT
- , rh.source == STREAM_SOURCE_TEXT);
+ PREDICATE_RETURN(STREAM_SOURCE_MASK(lh.source) == STREAM_SOURCE_TEXT
+ , STREAM_SOURCE_MASK(rh.source) == STREAM_SOURCE_TEXT);
}
if(!subson || original)
@@ -276,15 +276,15 @@ class PredicateSubtitlePriority
CStdString subtitle_language = g_langInfo.GetSubtitleLanguage();
if(!original)
{
- PREDICATE_RETURN((lh.source == STREAM_SOURCE_DEMUX_SUB || lh.source == STREAM_SOURCE_TEXT) && g_LangCodeExpander.CompareLangCodes(subtitle_language, lh.language)
- , (rh.source == STREAM_SOURCE_DEMUX_SUB || rh.source == STREAM_SOURCE_TEXT) && g_LangCodeExpander.CompareLangCodes(subtitle_language, rh.language));
+ PREDICATE_RETURN((STREAM_SOURCE_MASK(lh.source) == STREAM_SOURCE_DEMUX_SUB || STREAM_SOURCE_MASK(lh.source) == STREAM_SOURCE_TEXT) && g_LangCodeExpander.CompareLangCodes(subtitle_language, lh.language)
+ , (STREAM_SOURCE_MASK(rh.source) == STREAM_SOURCE_DEMUX_SUB || STREAM_SOURCE_MASK(rh.source) == STREAM_SOURCE_TEXT) && g_LangCodeExpander.CompareLangCodes(subtitle_language, rh.language));
}
- PREDICATE_RETURN(lh.source == STREAM_SOURCE_DEMUX_SUB
- , rh.source == STREAM_SOURCE_DEMUX_SUB);
+ PREDICATE_RETURN(STREAM_SOURCE_MASK(lh.source) == STREAM_SOURCE_DEMUX_SUB
+ , STREAM_SOURCE_MASK(rh.source) == STREAM_SOURCE_DEMUX_SUB);
- PREDICATE_RETURN(lh.source == STREAM_SOURCE_TEXT
- , rh.source == STREAM_SOURCE_TEXT);
+ PREDICATE_RETURN(STREAM_SOURCE_MASK(lh.source) == STREAM_SOURCE_TEXT
+ , STREAM_SOURCE_MASK(rh.source) == STREAM_SOURCE_TEXT);
if(!original)
{

0 comments on commit 2a67e31

Please sign in to comment.