fix semmle report

pull/214/head
mpromonet 4 years ago
parent 98101186cb
commit 682a4bd076

@ -11,6 +11,8 @@
**
** -------------------------------------------------------------------------*/
#pragma once
#include "logger.h"
#include "JPEGVideoSource.hh"

@ -14,7 +14,7 @@
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED, function() { video.play(); });
} else {
document.write("HLS not supported");
alert("HLS not supported");
}
</script>
</body>

@ -235,10 +235,10 @@ void V4L2DeviceSource::processFrame(char * frame, int frameSize, const timeval &
std::list< std::pair<unsigned char*,size_t> > frameList = this->splitFrames((unsigned char*)frame, frameSize);
while (!frameList.empty())
{
std::pair<unsigned char*,size_t>& frame = frameList.front();
size_t size = frame.second;
std::pair<unsigned char*,size_t>& item = frameList.front();
size_t size = item.second;
char* buf = new char[size];
memcpy(buf, frame.first, size);
memcpy(buf, item.first, size);
queueFrame(buf,size,ref);
frameList.pop_front();

Loading…
Cancel
Save