From 21c8587d1c4b734e168daa86a0341b530c51543d Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Mon, 15 Jan 2007 20:48:58 +0000 Subject: [PATCH] Fixed loading with mpeg2dec3 on avs 2.5.7+ (Myrsloik) Originally committed to SVN as r801. --- aegisub/video_provider_avs.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aegisub/video_provider_avs.cpp b/aegisub/video_provider_avs.cpp index ef16d8924..82cfd5f23 100644 --- a/aegisub/video_provider_avs.cpp +++ b/aegisub/video_provider_avs.cpp @@ -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