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

VideoRenderer crash on texture update #421

Merged
merged 1 commit into from
Oct 11, 2023
Merged
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
10 changes: 5 additions & 5 deletions DolbyIO/Source/Private/Video/DolbyIOVideoTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ namespace DolbyIO
[SharedThis = AsShared()](FRHICommandListImmediate& RHICmdList)
{
FScopeLock Lock{SharedThis->GetBufferLock()};
RHIUpdateTexture2D(SharedThis->Texture->GetResource()->GetTexture2DRHI(), 0,
FUpdateTextureRegion2D{0, 0, 0, 0,
static_cast<uint32>(SharedThis->Texture->GetSizeX()),
static_cast<uint32>(SharedThis->Texture->GetSizeY())},
SharedThis->Texture->GetSizeX() * Stride, SharedThis->GetBuffer());
auto FRHITexture2D_Ptr = SharedThis->Texture->GetResource()->GetTexture2DRHI();
uint32 SizeX = FRHITexture2D_Ptr->GetSizeX(), SizeY = FRHITexture2D_Ptr->GetSizeY();
RHIUpdateTexture2D(FRHITexture2D_Ptr, 0,
FUpdateTextureRegion2D{0, 0, 0, 0, SizeX, SizeY},
SizeX * Stride, SharedThis->GetBuffer());
});
}

Expand Down