Skip to content

Commit

Permalink
fix stop rendering on close
Browse files Browse the repository at this point in the history
  • Loading branch information
f0e committed Nov 2, 2023
1 parent f2aa357 commit 94bbfde
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/common/blur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ bool c_blur::initialise(bool _verbose, bool _using_preview) {
using_preview = _using_preview;

std::atexit([] {
rendering.stop_rendering();
blur.cleanup();
});

Expand Down
1 change: 1 addition & 0 deletions src/common/rendering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ void c_render::render() {
}

void c_rendering::stop_rendering() {
// stop vspipe
TerminateProcess(vspipe_pi.hProcess, 0);

// send wm_close to ffmpeg so that it can gracefully stop
Expand Down
1 change: 0 additions & 1 deletion src/gui/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,4 @@ void gui::run() {
glfwTerminate();

open = false;
rendering.stop_rendering();
}

0 comments on commit 94bbfde

Please sign in to comment.