Only register the CSRI subtitles provider if there actually are any CSRI providers available

Originally committed to SVN as r6687.
This commit is contained in:
Thomas Goyne 2012-04-10 20:41:20 +00:00
parent e6978e9909
commit 9f87a2bacb

View file

@ -78,7 +78,9 @@ SubtitlesProvider* SubtitlesProviderFactory::GetProvider() {
///
void SubtitlesProviderFactory::RegisterProviders() {
#ifdef WITH_CSRI
Register<CSRISubtitlesProvider>("CSRI", false, CSRISubtitlesProvider::GetSubTypes());
std::vector<std::string> csri_providers(CSRISubtitlesProvider::GetSubTypes());
if (!csri_providers.empty())
Register<CSRISubtitlesProvider>("CSRI", false, csri_providers);
#endif
#ifdef WITH_LIBASS
Register<LibassSubtitlesProvider>("libass");