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

Commit 7fdc061

Browse files
authored
VideoRenderer crash on texture update (#421)
- Pass the 2DRHI texture sizes when updating - It seems like this what is described -> Where the passed ref could have different bounds then the sizes
1 parent 16e57ce commit 7fdc061

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

DolbyIO/Source/Private/Video/DolbyIOVideoTexture.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@ namespace DolbyIO
109109
[SharedThis = AsShared()](FRHICommandListImmediate& RHICmdList)
110110
{
111111
FScopeLock Lock{SharedThis->GetBufferLock()};
112-
RHIUpdateTexture2D(SharedThis->Texture->GetResource()->GetTexture2DRHI(), 0,
113-
FUpdateTextureRegion2D{0, 0, 0, 0,
114-
static_cast<uint32>(SharedThis->Texture->GetSizeX()),
115-
static_cast<uint32>(SharedThis->Texture->GetSizeY())},
116-
SharedThis->Texture->GetSizeX() * Stride, SharedThis->GetBuffer());
112+
auto FRHITexture2D_Ptr = SharedThis->Texture->GetResource()->GetTexture2DRHI();
113+
uint32 SizeX = FRHITexture2D_Ptr->GetSizeX(), SizeY = FRHITexture2D_Ptr->GetSizeY();
114+
RHIUpdateTexture2D(FRHITexture2D_Ptr, 0,
115+
FUpdateTextureRegion2D{0, 0, 0, 0, SizeX, SizeY},
116+
SizeX * Stride, SharedThis->GetBuffer());
117117
});
118118
}
119119

0 commit comments

Comments
 (0)