From 0eaa4d8a29782ae20d7b54fd8334371e724f1c57 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 29 Mar 2020 14:32:56 +0200 Subject: [PATCH] Fix a memory leak in DecklinkOutput. --- nageru/decklink_output.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nageru/decklink_output.cpp b/nageru/decklink_output.cpp index c9cd481..6b21edb 100644 --- a/nageru/decklink_output.cpp +++ b/nageru/decklink_output.cpp @@ -248,6 +248,11 @@ void DeckLinkOutput::end_output() frame_freelist.pop(); } } + + if (output != nullptr) { + output->Release(); + output = nullptr; + } } void DeckLinkOutput::send_frame(GLuint y_tex, GLuint cbcr_tex, YCbCrLumaCoefficients output_ycbcr_coefficients, const vector &input_frames, int64_t pts, int64_t duration) -- 2.39.5