Skip to content

Commit

Permalink
Fix the order of selection tokens in "Default" mode
Browse files Browse the repository at this point in the history
Default subtitles should have a higher priority over Forced subtitles,
if Default mode is being used. Otherwise the presence of a forced
subtitle will override usage of a Default subtitle, while if the Default
subtitle would be alone, it would get used - a rather inconsistent
result.
  • Loading branch information
Nevcairiel committed Feb 14, 2022
1 parent fb4ef7b commit c7c6438
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demuxer/LAVSplitter/LAVSplitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1725,9 +1725,9 @@ std::list<CSubtitleSelector> CLAVSplitter::GetSubtitleSelectors()
std::string token = "*:" + lang;
if (m_settings.subtitleMode == LAVSubtitleMode_ForcedOnly || bNoLanguage)
{
tokenList.push_back(token + "|f");
if (m_settings.subtitleMode == LAVSubtitleMode_Default)
tokenList.push_back(token + "|d");
tokenList.push_back(token + "|f");
}
else
{
Expand All @@ -1737,9 +1737,9 @@ std::list<CSubtitleSelector> CLAVSplitter::GetSubtitleSelectors()
}

// Add fallbacks (forced/default)
tokenList.push_back("*:*|f");
if (m_settings.subtitleMode == LAVSubtitleMode_Default)
tokenList.push_back("*:*|d");
tokenList.push_back("*:*|f");
}
else if (m_settings.subtitleMode == LAVSubtitleMode_Advanced)
{
Expand Down

0 comments on commit c7c6438

Please sign in to comment.