Skip to content

Commit

Permalink
Cleaned up dependency loader.
Browse files Browse the repository at this point in the history
gmpreussner committed Sep 12, 2016

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 5483bdd commit 9706867
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions Source/VlcMedia/Private/Vlc/Vlc.cpp
Original file line number Diff line number Diff line change
@@ -33,10 +33,6 @@ void* FVlc::CoreHandle = nullptr;
void* FVlc::LibHandle = nullptr;
FString FVlc::PluginDir;

#if PLATFORM_WINDOWS
void* FVlc::GccHandle = nullptr;
#endif


VLC_DEFINE(New);
VLC_DEFINE(Release);
@@ -145,10 +141,15 @@ bool FVlc::Initialize()
#endif

// load required libraries in the correct order
if (!LoadDependency(LibDir, TEXT("libvlccore"), CoreHandle) ||
!LoadDependency(LibDir, TEXT("libvlc"), LibHandle))
if (!LoadDependency(LibDir, TEXT("libvlccore"), CoreHandle))
{
Shutdown();
return false;
}

if (!LoadDependency(LibDir, TEXT("libvlc"), LibHandle))
{
FreeDependency(CoreHandle);

return false;
}

@@ -244,10 +245,6 @@ void FVlc::Shutdown()

FreeDependency(LibHandle);
FreeDependency(CoreHandle);

#if PLATFORM_WINDOWS
FreeDependency(GccHandle);
#endif
}


0 comments on commit 9706867

Please sign in to comment.