Skip to content

Commit 18cc532

Browse files
authored
Merge pull request #324 from avTranscoder/fix/video_filters
Fix video filters
2 parents af4c609 + 40b5e9d commit 18cc532

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-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 4
6+
#define AVTRANSCODER_VERSION_MICRO 5
77

88
#include <AvTranscoder/system.hpp>
99

src/AvTranscoder/transcoder/StreamTranscoder.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -751,12 +751,6 @@ 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-
}
760754

761755
// Check decoding status
762756
bool continueProcess = true;
@@ -811,6 +805,15 @@ IOutputStream::EWrappingStatus StreamTranscoder::processTranscode()
811805
LOG_DEBUG("Encode")
812806
_outputEncoder->encodeFrame(*_transformedData, data);
813807

808+
if(_filterGraph->hasFilters())
809+
{
810+
LOG_DEBUG("Free filtered data") // filled from filter graph sink
811+
if (_filteredData->isVideoFrame()) {
812+
// Do not unref filter audio frame, to avoid reallocating it each time
813+
av_frame_unref(&_filteredData->getAVFrame());
814+
}
815+
_filteredData->freeData();
816+
}
814817
}
815818
else
816819
{

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