We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentaf4c609 commit2e0fde3Copy full SHA for 2e0fde3
src/AvTranscoder/transcoder/StreamTranscoder.cpp
@@ -751,12 +751,6 @@ IOutputStream::EWrappingStatus StreamTranscoder::processTranscode()
751
_transformedData->allocateData();
752
}
753
754
-elseif(_filterGraph->hasFilters())
755
- {
756
-LOG_DEBUG("Free filtered data")// filled from filter graph sink
757
-av_frame_unref(&_filteredData->getAVFrame());
758
- _filteredData->freeData();
759
- }
760
761
// Check decoding status
762
bool continueProcess =true;
@@ -811,6 +805,15 @@ IOutputStream::EWrappingStatus StreamTranscoder::processTranscode()
811
805
LOG_DEBUG("Encode")
812
806
_outputEncoder->encodeFrame(*_transformedData, data);
813
807
808
+if(_filterGraph->hasFilters())
809
+ {
810
+LOG_DEBUG("Free filtered data")// filled from filter graph sink
+if (_filteredData->isVideoFrame()) {
+// Do not unref filter audio frame, to avoid reallocating it each time
+av_frame_unref(&_filteredData->getAVFrame());
814
+ }
815
+ _filteredData->freeData();
816
817
818
else
819
{