File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 3
3
4
4
#define AVTRANSCODER_VERSION_MAJOR 0
5
5
#define AVTRANSCODER_VERSION_MINOR 15
6
- #define AVTRANSCODER_VERSION_MICRO 4
6
+ #define AVTRANSCODER_VERSION_MICRO 5
7
7
8
8
#include < AvTranscoder/system.hpp>
9
9
Original file line number Diff line number Diff line change @@ -751,12 +751,6 @@ IOutputStream::EWrappingStatus StreamTranscoder::processTranscode()
751
751
_transformedData->allocateData ();
752
752
}
753
753
}
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
- }
760
754
761
755
// Check decoding status
762
756
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
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
+ }
814
817
}
815
818
else
816
819
{
You can’t perform that action at this time.
0 commit comments