Skip to content

Commit 9c6ee8a

Browse files
author
Valentin Noel
committed
StreamTranscoder: unref the filtergraph output AVFrame after it has been converted
1 parent 6d4a2aa commit 9c6ee8a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/AvTranscoder/transcoder/StreamTranscoder.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,10 @@ bool StreamTranscoder::processTranscode()
550550
LOG_DEBUG("Convert")
551551
_transform->convert(*_filteredData, *_transformedData);
552552

553+
// free the filtered AVFrame now it has been converted into another one
554+
// @see the av_buffersink_get_frame documentation
555+
av_frame_unref(&_filteredData->getAVFrame());
556+
553557
LOG_DEBUG("Encode")
554558
_outputEncoder->encodeFrame(*_transformedData, data);
555559
}

0 commit comments

Comments
 (0)