]> git.sesse.net Git - nageru/commitdiff
Fix a memory leak in DecklinkOutput.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 29 Mar 2020 12:32:56 +0000 (14:32 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 29 Mar 2020 12:32:56 +0000 (14:32 +0200)
nageru/decklink_output.cpp

index c9cd481c4d49e411dcdeb69028408bb3d20bcc18..6b21edb0c45d066ebf3d8d68a6f8ed27410f4f8d 100644 (file)
@@ -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<RefCountedFrame> &input_frames, int64_t pts, int64_t duration)