From: Steinar H. Gunderson Date: Sun, 29 Mar 2020 12:32:56 +0000 (+0200) Subject: Fix a memory leak in DecklinkOutput. X-Git-Tag: 1.9.2~3 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;ds=sidebyside;h=0eaa4d8a29782ae20d7b54fd8334371e724f1c57;p=nageru Fix a memory leak in DecklinkOutput. --- 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)