Skip to content

Commit

Permalink
Fix two small memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
baconz committed Dec 22, 2016
1 parent 29986f0 commit 5f75ccb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Source/C++/Core/Ap4CommonEncryption.cpp
Expand Up @@ -1873,6 +1873,8 @@ class AP4_CencFragmentDecrypter : public AP4_Processor::FragmentHandler {
m_SaizAtom(saiz_atom),
m_SampleEncryptionAtom(sample_encryption_atom) {}

~AP4_CencFragmentDecrypter() { delete m_SampleDecrypter; }

// methods
virtual AP4_Result ProcessFragment();
virtual AP4_Result FinishFragment();
Expand Down
4 changes: 3 additions & 1 deletion Source/C++/Core/Ap4SampleDescription.h
Expand Up @@ -304,7 +304,9 @@ class AP4_AvcSampleDescription : public AP4_SampleDescription,
AP4_UI08 nalu_length_size,
const AP4_Array<AP4_DataBuffer>& sequence_parameters,
const AP4_Array<AP4_DataBuffer>& picture_parameters);


~AP4_AvcSampleDescription() { delete m_AvccAtom; }

// accessors
AP4_UI08 GetConfigurationVersion() const { return m_AvccAtom->GetConfigurationVersion(); }
AP4_UI08 GetProfile() const { return m_AvccAtom->GetProfile(); }
Expand Down

0 comments on commit 5f75ccb

Please sign in to comment.