diff --git a/inc/MJPEGVideoSource.h b/inc/MJPEGVideoSource.h index 29f77e2..affe35b 100644 --- a/inc/MJPEGVideoSource.h +++ b/inc/MJPEGVideoSource.h @@ -11,6 +11,8 @@ ** ** -------------------------------------------------------------------------*/ +#pragma once + #include "logger.h" #include "JPEGVideoSource.hh" diff --git a/index.html b/index.html index df246a1..6e98988 100644 --- a/index.html +++ b/index.html @@ -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"); } diff --git a/src/DeviceSource.cpp b/src/DeviceSource.cpp index 7895c05..fbf7f06 100644 --- a/src/DeviceSource.cpp +++ b/src/DeviceSource.cpp @@ -235,10 +235,10 @@ void V4L2DeviceSource::processFrame(char * frame, int frameSize, const timeval & std::list< std::pair > frameList = this->splitFrames((unsigned char*)frame, frameSize); while (!frameList.empty()) { - std::pair& frame = frameList.front(); - size_t size = frame.second; + std::pair& 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();