From 22faf80cdb98b068da44d51b6d692c4e5a50e067 Mon Sep 17 00:00:00 2001 From: Karl Blomster Date: Thu, 23 Apr 2009 02:09:05 +0000 Subject: [PATCH] Avisynth video provider will now use ffmpegsource2 instead of ffmpegsource when so required. Originally committed to SVN as r2838. --- aegisub/src/video_provider_avs.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/aegisub/src/video_provider_avs.cpp b/aegisub/src/video_provider_avs.cpp index 310f8048d..30e7aff4d 100644 --- a/aegisub/src/video_provider_avs.cpp +++ b/aegisub/src/video_provider_avs.cpp @@ -188,28 +188,28 @@ PClip AvisynthVideoProvider::OpenVideo(Aegisub::String _filename, bool mpeg2dec3 // Try loading FFMpegSource directshowOpen: bool ffsource = false; - if (env->FunctionExists("ffmpegsource")) ffsource = true; + if (env->FunctionExists("ffvideosource")) ffsource = true; if (!ffsource) { - wxFileName ffsourcepath(StandardPaths::DecodePath(_T("?data/ffmpegsource.dll"))); + wxFileName ffsourcepath(StandardPaths::DecodePath(_T("?data/ffms2.dll"))); if (ffsourcepath.FileExists()) { - AVSTRACE(_T("AvisynthVideoProvider::OpenVideo: Loading FFMpegSource")); + AVSTRACE(_T("AvisynthVideoProvider::OpenVideo: Loading FFMpegSource2")); env->Invoke("LoadPlugin",env->SaveString(ffsourcepath.GetFullPath().mb_str(wxConvLocal))); - AVSTRACE(_T("AvisynthVideoProvider::OpenVideo: Loaded FFMpegSource")); + AVSTRACE(_T("AvisynthVideoProvider::OpenVideo: Loaded FFMpegSource2")); byFrame = true; } } // If FFMpegSource loaded properly, try using it ffsource = false; - if (env->FunctionExists("ffmpegsource")) { - AVSTRACE(_T("AvisynthVideoProvider::OpenVideo: Invoking FFMpegSource")); - const char *argnames[2] = { "source", "vcache" }; + if (env->FunctionExists("ffvideosource")) { + AVSTRACE(_T("AvisynthVideoProvider::OpenVideo: Invoking FFMpegSource2")); + const char *argnames[2] = { "source", "cache" }; AVSValue args[2] = { videoFilename, false }; - script = env->Invoke("ffmpegsource", AVSValue(args,2), argnames); + script = env->Invoke("ffvideosource", AVSValue(args,2), argnames); //script = env->Invoke("ffmpegsource", videoFilename); - AVSTRACE(_T("AvisynthVideoProvider::OpenVideo: Successfully opened file with FFMpegSource")); + AVSTRACE(_T("AvisynthVideoProvider::OpenVideo: Successfully opened file with FFMpegSource2")); ffsource = true; - decoderName = _T("FFmpegSource"); + decoderName = _T("FFmpegSource2"); } // DirectShowSource