Fixed loading with mpeg2dec3 on avs 2.5.7+ (Myrsloik)

Originally committed to SVN as r801.
This commit is contained in:
Rodrigo Braz Monteiro 2007-01-15 20:48:58 +00:00
parent 6b9dc5e401
commit 21c8587d1c
1 changed files with 4 additions and 2 deletions

View File

@ -195,8 +195,10 @@ PClip AvisynthVideoProvider::OpenVideo(wxString _filename, bool mpeg2dec3_priori
script = env->Invoke("Mpeg2Dec3_Mpeg2Source", videoFilename);
//if avisynth is 2.5.7 beta 2 or newer old mpeg2decs will crash without this
// if (env->FunctionExists("SetPlanarLegacyAlignment"))
// script = env->Invoke("SetPlanarLegacyAlignment", script);
if (env->FunctionExists("SetPlanarLegacyAlignment")) {
AVSValue args[2] = { script, true };
script = env->Invoke("SetPlanarLegacyAlignment", AVSValue(args,2));
}
}
// If that fails, try opening it with DGDecode