Skip to content

Commit

Permalink
Do not check for dependencies (#16)
Browse files Browse the repository at this point in the history
* Do not check for dependencies

* Use XML doc
  • Loading branch information
Speykious authored Feb 1, 2022
1 parent 9359180 commit c223bc9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions SeeShark/FFmpeg/FFmpegManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ public static bool CanLoadLibraries(LibraryFlags libraries = LibraryFlags.All, s
return libraries.ToStrings().All((lib) => canLoadLibrary(lib, path, validated));
}

// Note: recurses in a very similar way to the LoadLibrary() method.
/// <remarks>
/// Note: dependencies are not checked as they are optional in FFmpeg.AutoGen.
/// See <see href="https://github.com/Ruslan-B/FFmpeg.AutoGen/commit/395dea80c642c85e089e3d7721f91d77594655c1">the following commit</see>
/// and <see href="https://github.com/Ruslan-B/FFmpeg.AutoGen/blob/633c15d323785092561329ad4b5742b0189116d6/FFmpeg.AutoGen/FFmpeg.cs#L57-L82">this function</see>
/// </remarks>
private static bool canLoadLibrary(string lib, string path, List<string> validated)
{
if (validated.Contains(lib))
Expand All @@ -129,9 +133,7 @@ private static bool canLoadLibrary(string lib, string path, List<string> validat
return false;

validated.Add(lib);

var dependencies = ffmpeg.LibraryDependenciesMap[lib];
return dependencies.Except(validated).All((dep) => canLoadLibrary(dep, path, validated));
return true;
}

/// <summary>
Expand Down

0 comments on commit c223bc9

Please sign in to comment.