Skip to content

Commit cd3cfee

Browse files
committed
fix: windows: correctly initialize SECURITY_ATTRIBUTES struct
1 parent fed5e10 commit cd3cfee

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/graphics/video_renderer_windows.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ std::optional<std::string> VideoRendererBackend::setup(u32 fps, shapes::UPoint s
3333
HANDLE pipe_read;
3434
HANDLE pipe_write;
3535

36-
SECURITY_ATTRIBUTES saAttr = { 0 };
37-
saAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
38-
saAttr.bInheritHandle = TRUE;
36+
SECURITY_ATTRIBUTES saAttr = { .nLength = sizeof(SECURITY_ATTRIBUTES),
37+
.lpSecurityDescriptor = nullptr,
38+
.bInheritHandle = TRUE };
39+
3940

4041
if (!CreatePipe(&pipe_read, &pipe_write, &saAttr, 0)) {
4142
return fmt::format("FFMPEG: Could not create pipe. System Error Code: {}", GetLastError());

0 commit comments

Comments
 (0)