Let ffms2 set number of video decoding threads automatically. Patch by TheRyuu.

Originally committed to SVN as r5491.
This commit is contained in:
Karl Blomster 2011-07-19 23:43:38 +00:00
parent 6ffc6de6b6
commit 239dbb08c1
2 changed files with 3 additions and 5 deletions

View File

@ -169,7 +169,7 @@ void OptionsManager::LoadDefaults(bool onlyDefaults,bool doOverride) {
SetText(_T("Video Provider"),_T(DEFAULT_PROVIDER_VIDEO),1945);
#endif
SetBool(_T("FFmpeg allow unsafe seeking"),false);
SetInt(_T("FFmpegSource decoding threads"),1);
SetInt(_T("FFmpegSource threads"),-1);
SetBool(_T("Allow Ancient Avisynth"),false,1700);
#ifdef __WINDOWS__
SetText(_T("Subtitles Provider"),_T("csri/vsfilter_textsub"),1700);

View File

@ -197,10 +197,8 @@ void FFmpegSourceVideoProvider::LoadVideo(wxString filename) {
}
}
// set thread count
int Threads = Options.AsInt(_T("FFmpegSource decoding threads"));
if (Threads < 1)
throw _T("FFmpegSource video provider: invalid decoding thread count");
//number of threads automatically determined by ffms2 if given a value < 1
int Threads = Options.AsInt(_T("FFmpegSource threads"));
// set seekmode
// TODO: give this its own option?