Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

omxplayer: [fix] subtitle priority for multiple external subtitles

  • Loading branch information...
commit 7182bbf1e70bfd10f2b980a68f6e65804a110663 1 parent 2a67e31
@ThiasDE ThiasDE authored
Showing with 11 additions and 11 deletions.
  1. +11 −11 xbmc/cores/omxplayer/OMXPlayer.cpp
View
22 xbmc/cores/omxplayer/OMXPlayer.cpp
@@ -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.