Skip to content

Commit

Permalink
fix for #190
Browse files Browse the repository at this point in the history
  • Loading branch information
barbibulle committed Sep 9, 2017
1 parent 0191f86 commit 03d1222
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/C++/Core/Ap4SampleEntry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -772,13 +772,13 @@ AP4_VisualSampleEntry::ReadFields(AP4_ByteStream& stream)
stream.ReadUI32(m_Reserved3);
stream.ReadUI16(m_FrameCount);

char compressor_name[33];
AP4_UI08 compressor_name[33];
compressor_name[32] = 0;
stream.Read(compressor_name, 32);
int name_length = compressor_name[0];
AP4_UI08 name_length = compressor_name[0];
if (name_length < 32) {
compressor_name[name_length+1] = 0; // force null termination
m_CompressorName = &compressor_name[1];
m_CompressorName = (const char*)(&compressor_name[1]);
}

stream.ReadUI16(m_Depth);
Expand Down

0 comments on commit 03d1222

Please sign in to comment.