Skip to content

Commit 5f75ccb

Browse files
committed
Fix two small memory leaks
1 parent 29986f0 commit 5f75ccb

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Source/C++/Core/Ap4CommonEncryption.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1873,6 +1873,8 @@ class AP4_CencFragmentDecrypter : public AP4_Processor::FragmentHandler {
18731873
m_SaizAtom(saiz_atom),
18741874
m_SampleEncryptionAtom(sample_encryption_atom) {}
18751875

1876+
~AP4_CencFragmentDecrypter() { delete m_SampleDecrypter; }
1877+
18761878
// methods
18771879
virtual AP4_Result ProcessFragment();
18781880
virtual AP4_Result FinishFragment();

Source/C++/Core/Ap4SampleDescription.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,9 @@ class AP4_AvcSampleDescription : public AP4_SampleDescription,
304304
AP4_UI08 nalu_length_size,
305305
const AP4_Array<AP4_DataBuffer>& sequence_parameters,
306306
const AP4_Array<AP4_DataBuffer>& picture_parameters);
307-
307+
308+
~AP4_AvcSampleDescription() { delete m_AvccAtom; }
309+
308310
// accessors
309311
AP4_UI08 GetConfigurationVersion() const { return m_AvccAtom->GetConfigurationVersion(); }
310312
AP4_UI08 GetProfile() const { return m_AvccAtom->GetProfile(); }

0 commit comments

Comments
 (0)