Skip to content

Commit

Permalink
fix for #233
Browse files Browse the repository at this point in the history
  • Loading branch information
barbibulle committed Jan 7, 2018
1 parent 70df1a5 commit e13b22f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Source/C++/Core/Ap4FtypAtom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,18 @@ AP4_DEFINE_DYNAMIC_CAST_ANCHOR(AP4_FtypAtom)
| AP4_FtypAtom::AP4_FtypAtom
+---------------------------------------------------------------------*/
AP4_FtypAtom::AP4_FtypAtom(AP4_UI32 size, AP4_ByteStream& stream) :
AP4_Atom(AP4_ATOM_TYPE_FTYP, size)
AP4_Atom(AP4_ATOM_TYPE_FTYP, size),
m_MajorBrand(0),
m_MinorVersion(0)
{
if (size < 16) return;
stream.ReadUI32(m_MajorBrand);
stream.ReadUI32(m_MinorVersion);
size -= 16;
while (size) {
while (size >= 4) {
AP4_UI32 compatible_brand;
stream.ReadUI32(compatible_brand);
AP4_Result result = stream.ReadUI32(compatible_brand);
if (AP4_FAILED(result)) return;
m_CompatibleBrands.Append(compatible_brand);
size -= 4;
}
Expand Down

0 comments on commit e13b22f

Please sign in to comment.