Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #4251 from ThiasDE/extsub_priority

dvdplayer: [fix] subtitle priority for multiple external subtitles
  • Loading branch information...
commit 5cd779bbb5d921ca1c08a6606df60a5dc9bfed3d 2 parents 5e111e7 + 7182bbf
jmarshallnz jmarshallnz authored
Showing with 22 additions and 22 deletions.
  1. +11 −11 xbmc/cores/dvdplayer/DVDPlayer.cpp
  2. +11 −11 xbmc/cores/omxplayer/OMXPlayer.cpp
22 xbmc/cores/dvdplayer/DVDPlayer.cpp
View
@@ -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)
{
22 xbmc/cores/omxplayer/OMXPlayer.cpp
View
@@ -208,7 +208,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;
}
@@ -301,11 +301,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)
@@ -320,15 +320,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)
{
Please sign in to comment.
Something went wrong with that request. Please try again.