Rework to remove static temp_img_buffer. Is now a class member. Must be allocated as needed.
This commit is contained in:
parent
243c780a6a
commit
67563737c3
|
@ -31,10 +31,8 @@ constexpr Seconds StreamBase::MAX_STREAM_DELAY;
|
||||||
constexpr Milliseconds StreamBase::MAX_SLEEP;
|
constexpr Milliseconds StreamBase::MAX_SLEEP;
|
||||||
|
|
||||||
StreamBase::~StreamBase() {
|
StreamBase::~StreamBase() {
|
||||||
if (vid_stream) {
|
|
||||||
delete vid_stream;
|
delete vid_stream;
|
||||||
vid_stream = nullptr;
|
delete temp_img_buffer;
|
||||||
}
|
|
||||||
closeComms();
|
closeComms();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -144,6 +144,9 @@ protected:
|
||||||
|
|
||||||
CmdMsg msg;
|
CmdMsg msg;
|
||||||
|
|
||||||
|
unsigned char *temp_img_buffer; // Used when encoding or sending file data
|
||||||
|
size_t temp_img_buffer_size;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool loadMonitor(int monitor_id);
|
bool loadMonitor(int monitor_id);
|
||||||
bool checkInitialised();
|
bool checkInitialised();
|
||||||
|
@ -182,7 +185,9 @@ public:
|
||||||
actual_fps(0.0),
|
actual_fps(0.0),
|
||||||
frame_count(0),
|
frame_count(0),
|
||||||
last_frame_count(0),
|
last_frame_count(0),
|
||||||
frame_mod(1)
|
frame_mod(1),
|
||||||
|
temp_img_buffer(nullptr),
|
||||||
|
temp_img_buffer_size(0)
|
||||||
{
|
{
|
||||||
memset(&loc_sock_path, 0, sizeof(loc_sock_path));
|
memset(&loc_sock_path, 0, sizeof(loc_sock_path));
|
||||||
memset(&loc_addr, 0, sizeof(loc_addr));
|
memset(&loc_addr, 0, sizeof(loc_addr));
|
||||||
|
|
Loading…
Reference in New Issue