Skip to content

Commit

Permalink
Fix HEVCDescriptor serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
harryz2000 authored Oct 22, 2024
1 parent 3e13e0e commit a828c61
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/h265/HEVCDescriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,18 +211,27 @@ DWORD HEVCDescriptor::Serialize(BYTE* buffer, DWORD bufferLength) const
writter.Set1(HEVC_RTP_NALU_Type::VPS); // bit(1) array_completeness + unsigned int(1) reserved = 0; unsigned int(6) NAL_unit_type;
writter.Set2(numOfVideoParameterSets);
for (auto& data : vpsData)
{
writter.Set2(data.GetSize());
writter.Set(data);
}
// SPS
writter.Set1(HEVC_RTP_NALU_Type::SPS); // bit(1) array_completeness + unsigned int(1) reserved = 0; unsigned int(6) NAL_unit_type;
writter.Set2(numOfSequenceParameterSets);
for (auto& data : spsData)
{
writter.Set2(data.GetSize());
writter.Set(data);
}

// PPS
writter.Set1(HEVC_RTP_NALU_Type::PPS); // bit(1) array_completeness + unsigned int(1) reserved = 0; unsigned int(6) NAL_unit_type;
writter.Set2(numOfPictureParameterSets);
for (auto& data : ppsData)
{
writter.Set2(data.GetSize());
writter.Set(data);
}

//Finished
return writter.GetLength();
Expand Down

0 comments on commit a828c61

Please sign in to comment.