Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
Reset Sdk on subsystem Deinitialize
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Audykowicz committed Aug 2, 2023
1 parent 925390d commit 2f9028f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions DolbyIO/Source/Private/Subsystem/DolbyIOInitialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ void UDolbyIOSubsystem::Initialize(FSubsystemCollectionBase& Collection)
BroadcastEvent(OnTokenNeeded);
}

void UDolbyIOSubsystem::Deinitialize()
{
Sdk.Reset(); // make sure Sdk is dead so it doesn't call handle_frame on VideoSink during game destruction

Super::Deinitialize();
}

void UDolbyIOSubsystem::SetLogSettings(EDolbyIOLogLevel SdkLogLevel, EDolbyIOLogLevel MediaLogLevel,
EDolbyIOLogLevel DvcLogLevel)
{
Expand Down
1 change: 1 addition & 0 deletions DolbyIO/Source/Public/DolbyIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ class DOLBYIO_API UDolbyIOSubsystem : public UGameInstanceSubsystem

private:
void Initialize(FSubsystemCollectionBase&) override;
void Deinitialize() override;

bool CanConnect(const FDolbyIOOnErrorDelegate&) const;
bool IsConnected() const;
Expand Down

0 comments on commit 2f9028f

Please sign in to comment.