Skip to content

Commit

Permalink
fix #696
Browse files Browse the repository at this point in the history
  • Loading branch information
mpromonet committed May 18, 2024
1 parent 824f4ee commit 571e2bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/livevideosource.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class LiveVideoSource : public VideoSourceWithDecoder, public T::Callback
m_cfg.clear();
m_cfg.insert(m_cfg.end(), buffer + index.start_offset, buffer + index.payload_size + index.payload_start_offset);

absl::optional<webrtc::SpsParser::SpsState> sps = webrtc::SpsParser::ParseSps(buffer + index.payload_start_offset, index.payload_size);
absl::optional<webrtc::SpsParser::SpsState> sps = webrtc::SpsParser::ParseSps(buffer + index.payload_start_offset + webrtc::H264::kNaluTypeSize, index.payload_size - webrtc::H264::kNaluTypeSize);
if (!sps)
{
RTC_LOG(LS_ERROR) << "cannot parse sps";
Expand Down Expand Up @@ -178,7 +178,7 @@ class LiveVideoSource : public VideoSourceWithDecoder, public T::Callback
RTC_LOG(LS_VERBOSE) << "LiveVideoSource:onData SPS";
m_cfg.insert(m_cfg.end(), buffer + index.start_offset, buffer + index.payload_size + index.payload_start_offset);

absl::optional<webrtc::H265SpsParser::SpsState> sps = webrtc::H265SpsParser::ParseSps(buffer + index.payload_start_offset, index.payload_size);
absl::optional<webrtc::H265SpsParser::SpsState> sps = webrtc::H265SpsParser::ParseSps(buffer + index.payload_start_offset + webrtc::H265::kNaluHeaderSize, index.payload_size - webrtc::H265::kNaluHeaderSize);
if (!sps)
{
RTC_LOG(LS_ERROR) << "cannot parse sps";
Expand Down

0 comments on commit 571e2bf

Please sign in to comment.