Fix a number of MSVC warnings
parent
530266917d
commit
4704723759
|
@ -297,11 +297,11 @@ static int avc_get_video_frame(struct ftl_stream *stream,
|
|||
|
||||
unsigned char *video_stream = packet->data;
|
||||
|
||||
while (consumed < packet->size) {
|
||||
while ((size_t)consumed < packet->size) {
|
||||
size_t total_max = sizeof(stream->coded_pic_buffer.nalus) /
|
||||
sizeof(stream->coded_pic_buffer.nalus[0]);
|
||||
|
||||
if (stream->coded_pic_buffer.total >= total_max) {
|
||||
if ((size_t)stream->coded_pic_buffer.total >= total_max) {
|
||||
warn("ERROR: cannot continue, nalu buffers are full");
|
||||
return -1;
|
||||
}
|
||||
|
@ -330,7 +330,7 @@ static int avc_get_video_frame(struct ftl_stream *stream,
|
|||
video_stream[2] << 8 |
|
||||
video_stream[3];
|
||||
|
||||
if (len > (packet->size - consumed)) {
|
||||
if ((size_t)len > (packet->size - (size_t)consumed)) {
|
||||
warn("ERROR: got len of %d but packet only "
|
||||
"has %d left",
|
||||
len, packet->size - consumed);
|
||||
|
@ -345,7 +345,8 @@ static int avc_get_video_frame(struct ftl_stream *stream,
|
|||
uint8_t nalu_type = video_stream[0] & 0x1F;
|
||||
uint8_t nri = (video_stream[0] >> 5) & 0x3;
|
||||
|
||||
int send_marker_bit = (consumed >= packet->size) && !is_header;
|
||||
int send_marker_bit =
|
||||
((size_t)consumed >= packet->size) && !is_header;
|
||||
|
||||
if ((nalu_type != 12 && nalu_type != 6 && nalu_type != 9) ||
|
||||
nri) {
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 0b989b70eb87080862219e6fd469e7a360bcdf5d
|
||||
Subproject commit a07f7398be8264a420c84ebae3f3712027a502b7
|
|
@ -28,7 +28,6 @@ set(seg_service_SOURCES
|
|||
seg_service.cpp
|
||||
SegProc.cpp
|
||||
stdafx.cpp
|
||||
xdlldata.c
|
||||
seg_service.rc
|
||||
${seg_service_GENERATED_FILES}
|
||||
)
|
||||
|
|
|
@ -145,8 +145,8 @@ private:
|
|||
m_senseManager->QueryCaptureManager()->FilterByStreamProfiles(nullptr);
|
||||
m_senseManager->QueryCaptureManager()->FilterByStreamProfiles(nullptr);
|
||||
|
||||
m_senseManager->QueryCaptureManager()->FilterByStreamProfiles(PXCCapture::StreamType::STREAM_TYPE_COLOR, 0, 0, m_fps);
|
||||
m_senseManager->QueryCaptureManager()->FilterByStreamProfiles(PXCCapture::StreamType::STREAM_TYPE_DEPTH, 0, 0, m_fps);
|
||||
m_senseManager->QueryCaptureManager()->FilterByStreamProfiles(PXCCapture::StreamType::STREAM_TYPE_COLOR, 0, 0, (pxcF32)m_fps);
|
||||
m_senseManager->QueryCaptureManager()->FilterByStreamProfiles(PXCCapture::StreamType::STREAM_TYPE_DEPTH, 0, 0, (pxcF32)m_fps);
|
||||
|
||||
status = m_senseManager->EnableStreams(¤tProfile);
|
||||
if (status != PXC_STATUS_NO_ERROR)
|
||||
|
@ -174,7 +174,7 @@ private:
|
|||
std::unique_lock<std::mutex> lck(m_pauseMtx);
|
||||
m_senseManager->Close();
|
||||
|
||||
pxcStatus status = senseMgrInit();
|
||||
senseMgrInit();
|
||||
m_isPause = false;
|
||||
m_cvPause.notify_one();
|
||||
return S_OK;
|
||||
|
@ -330,7 +330,7 @@ public:
|
|||
|
||||
static DWORD WINAPI LoopStub(LPVOID lpParam)
|
||||
{
|
||||
if (!lpParam) return -1;
|
||||
if (!lpParam) return (DWORD)-1;
|
||||
return ((CSegProc*)lpParam)->Loop(NULL);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue