Skip to content

Commit

Permalink
rref: correct size of reference_type_count
Browse files Browse the repository at this point in the history
Resolves nokiatech#117
  • Loading branch information
bradh committed Apr 12, 2023
1 parent be43efd commit 89725e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions srcs/common/requiredreferencetypesproperty.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void RequiredReferenceTypesProperty::writeBox(BitStream& output) const
{
writeFullBoxHeader(output);

output.write32Bits(static_cast<unsigned int>(mReferenceTypes.size()));
output.write8Bits(static_cast<unsigned int>(mReferenceTypes.size()));
for (auto referenceType : mReferenceTypes)
{
output.write32Bits(referenceType.getUInt32());
Expand All @@ -49,8 +49,8 @@ void RequiredReferenceTypesProperty::parseBox(BitStream& input)
{
parseFullBoxHeader(input);

const std::uint32_t entryCount = input.read32Bits();
for (std::uint32_t i = 0; i < entryCount; ++i)
const std::uint8_t entryCount = input.read8Bits();
for (std::uint8_t i = 0; i < entryCount; ++i)
{
mReferenceTypes.push_back(input.read32Bits());
}
Expand Down

0 comments on commit 89725e9

Please sign in to comment.