Skip to content

Commit

Permalink
v4l2 cpature
Browse files Browse the repository at this point in the history
  • Loading branch information
mpromonet committed Apr 10, 2021
1 parent de70d56 commit 97425e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/V4l2Capturer.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ class V4l2Capturer : public rtc::VideoSourceInterface<webrtc::VideoFrame>
webrtc::H264::NaluType nalu_type = webrtc::H264::ParseNaluType(buffer[index.payload_start_offset]);
RTC_LOG(LS_VERBOSE) << __FUNCTION__ << " nalu:" << nalu_type << " payload_start_offset:" << index.payload_start_offset << " start_offset:" << index.start_offset << " size:" << index.payload_size;
if (nalu_type == webrtc::H264::NaluType::kSps) {
m_sps = webrtc::EncodedImageBuffer::Create((uint8_t*)buffer[index.start_offset], index.payload_size + index.payload_start_offset - index.start_offset);
m_sps = webrtc::EncodedImageBuffer::Create((uint8_t*)&buffer[index.start_offset], index.payload_size + index.payload_start_offset - index.start_offset);
cfg++;
}
else if (nalu_type == webrtc::H264::NaluType::kPps) {
m_pps = webrtc::EncodedImageBuffer::Create((uint8_t*)buffer[index.start_offset], index.payload_size + index.payload_start_offset - index.start_offset);
m_pps = webrtc::EncodedImageBuffer::Create((uint8_t*)&buffer[index.start_offset], index.payload_size + index.payload_start_offset - index.start_offset);
cfg++;
}
else if (nalu_type == webrtc::H264::NaluType::kIdr) {
Expand Down

0 comments on commit 97425e4

Please sign in to comment.