Skip to content

Commit af4c609

Browse files
authored
Merge pull request #323 from avTranscoder/fix/filters_memory_leak
Fix filter memory leak
2 parents f32fc13 + d4a39a9 commit af4c609

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/AvTranscoder/common.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#define AVTRANSCODER_VERSION_MAJOR 0
55
#define AVTRANSCODER_VERSION_MINOR 15
6-
#define AVTRANSCODER_VERSION_MICRO 3
6+
#define AVTRANSCODER_VERSION_MICRO 4
77

88
#include <AvTranscoder/system.hpp>
99

src/AvTranscoder/transcoder/StreamTranscoder.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,12 @@ IOutputStream::EWrappingStatus StreamTranscoder::processTranscode()
751751
_transformedData->allocateData();
752752
}
753753
}
754+
else if(_filterGraph->hasFilters())
755+
{
756+
LOG_DEBUG("Free filtered data") // filled from filter graph sink
757+
av_frame_unref(&_filteredData->getAVFrame());
758+
_filteredData->freeData();
759+
}
754760

755761
// Check decoding status
756762
bool continueProcess = true;
@@ -805,12 +811,6 @@ IOutputStream::EWrappingStatus StreamTranscoder::processTranscode()
805811
LOG_DEBUG("Encode")
806812
_outputEncoder->encodeFrame(*_transformedData, data);
807813

808-
if(_filterGraph->hasFilters())
809-
{
810-
LOG_DEBUG("Free filtered data") // filled from filter graph sink
811-
av_frame_unref(&_filteredData->getAVFrame());
812-
_filteredData->freeData();
813-
}
814814
}
815815
else
816816
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy