Video will now load without an available subtitles provider.
Originally committed to SVN as r880.
This commit is contained in:
parent
99e9dce99f
commit
52060ceb03
2 changed files with 8 additions and 4 deletions
|
@ -247,11 +247,15 @@ void VideoContext::SetVideo(const wxString &filename) {
|
|||
|
||||
// Choose a provider
|
||||
provider = VideoProviderFactory::GetProvider(filename,overFps);
|
||||
loaded = provider != NULL;
|
||||
|
||||
// Get subtitles provider
|
||||
subsProvider = provider->GetAsSubtitlesProvider();
|
||||
if (!subsProvider) subsProvider = SubtitlesProviderFactory::GetProvider();
|
||||
loaded = provider != NULL;
|
||||
try {
|
||||
subsProvider = provider->GetAsSubtitlesProvider();
|
||||
if (!subsProvider) subsProvider = SubtitlesProviderFactory::GetProvider();
|
||||
}
|
||||
catch (wxString err) { wxMessageBox(_T("Error while loading subtitles provider: ") + err,_T("Subtitles provider")); }
|
||||
catch (const wchar_t *err) { wxMessageBox(_T("Error while loading subtitles provider: ") + wxString(err),_T("Subtitles provider")); }
|
||||
|
||||
// Set frame rate
|
||||
fps = provider->GetFPS();
|
||||
|
|
|
@ -99,7 +99,7 @@ void VideoProvider::Cache(int n,const AegiVideoFrame frame) {
|
|||
// Cache enabled?
|
||||
if (cacheMax == 0) return;
|
||||
|
||||
// Cache full, remove use frame at front
|
||||
// Cache full, use frame at front
|
||||
if (cache.size() >= cacheMax) {
|
||||
cache.push_back(cache.front());
|
||||
cache.pop_front();
|
||||
|
|
Loading…
Reference in a new issue