Skip to content

Commit

Permalink
fix: windows: correctly initialize SECURITY_ATTRIBUTES struct
Browse files Browse the repository at this point in the history
  • Loading branch information
Totto16 committed Nov 14, 2024
1 parent fed5e10 commit cd3cfee
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/graphics/video_renderer_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ std::optional<std::string> VideoRendererBackend::setup(u32 fps, shapes::UPoint s
HANDLE pipe_read;
HANDLE pipe_write;

SECURITY_ATTRIBUTES saAttr = { 0 };
saAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
saAttr.bInheritHandle = TRUE;
SECURITY_ATTRIBUTES saAttr = { .nLength = sizeof(SECURITY_ATTRIBUTES),
.lpSecurityDescriptor = nullptr,
.bInheritHandle = TRUE };


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

0 comments on commit cd3cfee

Please sign in to comment.