decklink: Add destructor for OBSVideoFrame, initialize flags
Fixes a memory leak and potential access to undefined variable. Detected by Coverity Scan.master
parent
4c8b209bf0
commit
e7df070438
|
@ -11,6 +11,11 @@ OBSVideoFrame::OBSVideoFrame(long width, long height,
|
|||
this->pixelFormat = pixelFormat;
|
||||
}
|
||||
|
||||
OBSVideoFrame::~OBSVideoFrame()
|
||||
{
|
||||
delete this->data;
|
||||
}
|
||||
|
||||
HRESULT OBSVideoFrame::SetFlags(BMDFrameFlags newFlags)
|
||||
{
|
||||
flags = newFlags;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
class OBSVideoFrame : public IDeckLinkMutableVideoFrame {
|
||||
private:
|
||||
BMDFrameFlags flags;
|
||||
BMDFrameFlags flags = bmdFrameFlagDefault;
|
||||
BMDPixelFormat pixelFormat = bmdFormat8BitYUV;
|
||||
|
||||
long width;
|
||||
|
@ -16,6 +16,7 @@ private:
|
|||
|
||||
public:
|
||||
OBSVideoFrame(long width, long height, BMDPixelFormat pixelFormat);
|
||||
~OBSVideoFrame();
|
||||
|
||||
HRESULT STDMETHODCALLTYPE SetFlags(BMDFrameFlags newFlags) override;
|
||||
|
||||
|
|
Loading…
Reference in New Issue