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

Reset Sdk on subsystem Deinitialize #343

Merged
merged 1 commit into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions DolbyIO/Source/Private/DolbyIOSubsystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ void UDolbyIOSubsystem::Initialize(FSubsystemCollectionBase& Collection)
OnTokenNeeded.Broadcast();
}

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

Super::Deinitialize();
}

#define MAKE_DLB_ERROR_HANDLER FErrorHandler(*this, __LINE__)

void UDolbyIOSubsystem::SetToken(const FString& Token)
Expand Down
1 change: 1 addition & 0 deletions DolbyIO/Source/Public/DolbyIOSubsystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ class DOLBYIO_API UDolbyIOSubsystem : public UGameInstanceSubsystem

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

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