fix mismatch new/delete

This commit is contained in:
mpromonet 2016-04-20 18:16:46 +02:00
parent feb4a5a176
commit faf8db0387
2 changed files with 4 additions and 4 deletions

View File

@ -38,7 +38,7 @@ class V4L2DeviceSource: public FramedSource
Frame(char* buffer, int size, timeval timestamp) : m_buffer(buffer), m_size(size), m_timestamp(timestamp) {};
Frame(const Frame&);
Frame& operator=(const Frame&);
~Frame() { delete m_buffer; };
~Frame() { delete [] m_buffer; };
char* m_buffer;
int m_size;

View File

@ -78,10 +78,10 @@ std::list< std::pair<unsigned char*,size_t> > H264_V4L2DeviceSource::splitFrames
os << "profile-level-id=" << std::hex << std::setw(6) << profile_level_id;
os << ";sprop-parameter-sets=" << sps_base64 <<"," << pps_base64;
m_auxLine.assign(os.str());
free(sps_base64);
free(pps_base64);
LOG(NOTICE) << m_auxLine;
delete [] sps_base64;
delete [] pps_base64;
}
frameList.push_back(std::make_pair<unsigned char*,size_t>(buffer, size));