From e79ef00863b6243bad117163fa56d619eacf971a Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Mon, 1 Jan 2007 03:34:08 +0000 Subject: [PATCH] Originally committed to SVN as r668. --- aegisub/video_provider_avs.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/aegisub/video_provider_avs.cpp b/aegisub/video_provider_avs.cpp index 497d38e4b..4331c299a 100644 --- a/aegisub/video_provider_avs.cpp +++ b/aegisub/video_provider_avs.cpp @@ -235,9 +235,16 @@ PClip AvisynthVideoProvider::OpenVideo(wxString _filename, bool mpeg2dec3_priori // Try DirectShowSource if (!dss2) { if (env->FunctionExists("DirectShowSource")) { - const char *argnames[3] = { 0, "video", "audio" }; - AVSValue args[3] = { videoFilename, true, false }; - script = env->Invoke("DirectShowSource", AVSValue(args,3), argnames); + if (fps == 0.0) { + const char *argnames[3] = { 0, "video", "audio" }; + AVSValue args[3] = { videoFilename, true, false }; + script = env->Invoke("DirectShowSource", AVSValue(args,3), argnames); + } + else { + const char *argnames[4] = { 0, "video", "audio" , "fps" }; + AVSValue args[4] = { videoFilename, true, false , fps }; + script = env->Invoke("DirectShowSource", AVSValue(args,4), argnames); + } AVSTRACE(_T("AvisynthVideoProvider::OpenVideo: Successfully opened file with DSS without audio")); usedDirectshow = true; }