Skip to content

Commit

Permalink
don't use ReadByte
Browse files Browse the repository at this point in the history
  • Loading branch information
barbibulle committed May 20, 2023
1 parent 472511c commit e385097
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Source/C++/Codecs/Ap4Ac3Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ AP4_Ac3Parser::FindHeader(AP4_UI08* header)

return AP4_SUCCESS;
} else {
m_Bits.ReadByte(); // skip
m_Bits.SkipBytes(1); // skip
}
}

Expand Down
2 changes: 1 addition & 1 deletion Source/C++/Codecs/Ap4AdtsParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ AP4_AdtsParser::FindHeader(AP4_UI08* header)

return AP4_SUCCESS;
} else {
m_Bits.ReadByte(); // skip
m_Bits.SkipBytes(1); // skip
}
}

Expand Down
11 changes: 0 additions & 11 deletions Source/C++/Codecs/Ap4BitStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ class AP4_BitStream
AP4_Result WriteBytes(const AP4_UI08* bytes, AP4_Size byte_count);
AP4_Size GetContiguousBytesAvailable();
AP4_Size GetBytesAvailable();
AP4_UI08 ReadByte();
AP4_Result ReadBytes(AP4_UI08* bytes, AP4_Size byte_count);
AP4_UI08 PeekByte();
AP4_Result PeekBytes(AP4_UI08* bytes, AP4_Size byte_count);
Expand Down Expand Up @@ -282,16 +281,6 @@ AP4_BitStream::SkipBit()
}
}

/*----------------------------------------------------------------------
| AP4_BitStream::ReadByte
+---------------------------------------------------------------------*/
inline AP4_UI08
AP4_BitStream::ReadByte()
{
SkipBits(m_BitsCached & 7);
return (AP4_UI08)ReadBits(8);
}

/*----------------------------------------------------------------------
| AP4_BitStream::PeekByte
+---------------------------------------------------------------------*/
Expand Down

0 comments on commit e385097

Please sign in to comment.