mirror of
https://github.com/mpromonet/v4l2rtspserver
synced 2024-11-08 01:10:33 +00:00
fix PPS parsing
This commit is contained in:
parent
e3633b7299
commit
ff30f1b8a8
@ -54,8 +54,8 @@ std::list< std::pair<unsigned char*,size_t> > H264_V4L2DeviceSource::splitFrames
|
|||||||
frameList.push_back(std::make_pair<unsigned char*,size_t>(buffer, size));
|
frameList.push_back(std::make_pair<unsigned char*,size_t>(buffer, size));
|
||||||
switch (buffer[0]&0x1F)
|
switch (buffer[0]&0x1F)
|
||||||
{
|
{
|
||||||
case 7: LOG(INFO) << "SPS"; m_sps.assign((char*)buffer,size); break;
|
case 7: LOG(INFO) << "SPS size:" << size; m_sps.assign((char*)buffer,size); break;
|
||||||
case 8: LOG(INFO) << "PPS"; m_pps.assign((char*)buffer,size); break;
|
case 8: LOG(INFO) << "PPS size:" << size; m_pps.assign((char*)buffer,size); break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ std::list< std::pair<unsigned char*,size_t> > H264_V4L2DeviceSource::splitFrames
|
|||||||
LOG(NOTICE) << m_auxLine;
|
LOG(NOTICE) << m_auxLine;
|
||||||
}
|
}
|
||||||
|
|
||||||
frameSize -= size;
|
frameSize -= size+sizeof(H264marker);
|
||||||
buffer = this->extractFrame(&buffer[size], frameSize, size);
|
buffer = this->extractFrame(&buffer[size], frameSize, size);
|
||||||
}
|
}
|
||||||
return frameList;
|
return frameList;
|
||||||
|
Loading…
Reference in New Issue
Block a user