Only wrap the avisynth-using part of AvisynthVideoProvider's constructor with try/catch so that avisynth is still initialized when the catch handler runs, which is required to actually get an error message. Closes #1444.
Originally committed to SVN as r6438.
This commit is contained in:
parent
c5c829357d
commit
ddc8dc9eca
1 changed files with 13 additions and 11 deletions
|
@ -53,7 +53,7 @@
|
|||
#include "standard_paths.h"
|
||||
#include "video_provider_avs.h"
|
||||
|
||||
AvisynthVideoProvider::AvisynthVideoProvider(wxString filename) try
|
||||
AvisynthVideoProvider::AvisynthVideoProvider(wxString filename)
|
||||
: last_fnum(-1)
|
||||
{
|
||||
iframe.flipped = true;
|
||||
|
@ -145,6 +145,7 @@ file_exit:
|
|||
}
|
||||
#endif
|
||||
|
||||
try {
|
||||
AVSValue script = Open(fname, extension);
|
||||
|
||||
// Check if video was loaded properly
|
||||
|
@ -154,9 +155,10 @@ file_exit:
|
|||
RGB32Video = (avs.GetEnv()->Invoke("Cache", avs.GetEnv()->Invoke("ConvertToRGB32", script))).AsClip();
|
||||
vi = RGB32Video->GetVideoInfo();
|
||||
fps = (double)vi.fps_numerator / vi.fps_denominator;
|
||||
}
|
||||
catch (AvisynthError const& err) {
|
||||
}
|
||||
catch (AvisynthError const& err) {
|
||||
throw VideoOpenError("Avisynth error: " + std::string(err.msg));
|
||||
}
|
||||
}
|
||||
|
||||
AvisynthVideoProvider::~AvisynthVideoProvider() {
|
||||
|
|
Loading…
Reference in a new issue