Skip to content

Commit

Permalink
Merge remote-tracking branch 'neheb/cl'
Browse files Browse the repository at this point in the history
  • Loading branch information
mbunkus committed Feb 24, 2024
2 parents c5198ed + d392e53 commit 306ac80
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/EbmlElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,11 @@ EbmlElement * EbmlElement::FindNextID(IOCallback & DataStream, const EbmlCallbac
while (!bElementFound) {
// read ID
aElementPosition = DataStream.getFilePointer();
std::uint32_t ReadSize = 0;
BitMask = 1 << 7;
while (PossibleID_Length < 4) {
if (!DataStream.read(&PossibleId.at(PossibleID_Length), 1))
return nullptr; // no more data

++ReadSize;
++PossibleID_Length;

if (PossibleId[0] & BitMask) {
Expand Down Expand Up @@ -190,7 +188,7 @@ EbmlElement * EbmlElement::FindNextID(IOCallback & DataStream, const EbmlCallbac
// Size is larger than 8 bytes
return nullptr;

ReadSize += DataStream.read(&PossibleSize.at(PossibleSizeLength++), 1);
DataStream.read(&PossibleSize.at(PossibleSizeLength++), 1);
_SizeLength = PossibleSizeLength;
SizeFound =
ReadCodedSizeValue(PossibleSize.data(), _SizeLength, SizeUnknown);
Expand Down

0 comments on commit 306ac80

Please sign in to comment.