Skip to content

Commit 2ccf4b6

Browse files
author
Clement Champetier
committed
VideoProperties: fix memory leak when analyseGopStructure
The data buffer of the VideoFrame will be allocated by the decoder.
1 parent 60dc19c commit 2ccf4b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/AvTranscoder/properties/VideoProperties.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ void VideoProperties::analyseGopStructure(IProgress& progress)
515515
size_t count = 0;
516516
int positionOfFirstKeyFrame = -1;
517517
int positionOfLastKeyFrame = -1;
518-
VideoFrame frame(VideoFrameDesc(getWidth(), getHeight(), getPixelFormatName(getPixelProperties().getAVPixelFormat())));
518+
VideoFrame frame(VideoFrameDesc(getWidth(), getHeight(), getPixelFormatName(getPixelProperties().getAVPixelFormat())), false);
519519
while(decoder.decodeNextFrame(frame))
520520
{
521521
AVFrame& avFrame = frame.getAVFrame();

0 commit comments

Comments
 (0)