summaryrefslogtreecommitdiff
path: root/kms++util/inc
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2020-08-04 11:30:56 +0300
committerGitHub <noreply@github.com>2020-08-04 11:30:56 +0300
commit38bee3092f2d477f1baebfcae464f888d3d04bbe (patch)
tree3c13af26923c64ea4b9dec87e1dbc93e5b01fd4b /kms++util/inc
parentd9d5e44526a3b8065e4ae913032020d0bfd93103 (diff)
parent85dbfbaedecb46ebd0aa89ffeb674de497555ca9 (diff)
Merge pull request #57 from dreamer-dead/videodevice-unique-ptr
Use unique_ptr to prevent memory leaks in VideoDevice class
Diffstat (limited to 'kms++util/inc')
-rw-r--r--kms++util/inc/kms++util/videodevice.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/kms++util/inc/kms++util/videodevice.h b/kms++util/inc/kms++util/videodevice.h
index e089bcd..0aaa103 100644
--- a/kms++util/inc/kms++util/videodevice.h
+++ b/kms++util/inc/kms++util/videodevice.h
@@ -1,6 +1,7 @@
#pragma once
#include <string>
+#include <memory>
#include <kms++/kms++.h>
class VideoStreamer;
@@ -50,8 +51,8 @@ private:
std::vector<kms::DumbFramebuffer*> m_capture_fbs;
std::vector<kms::DumbFramebuffer*> m_output_fbs;
- VideoStreamer* m_capture_streamer;
- VideoStreamer* m_output_streamer;
+ std::unique_ptr<VideoStreamer> m_capture_streamer;
+ std::unique_ptr<VideoStreamer> m_output_streamer;
};
class VideoStreamer