Skip to content

Commit f66a554

Browse files
author
Clement Champetier
committed
VideoTransform: free swsContext
1 parent 7bd3b50 commit f66a554

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/AvTranscoder/transform/VideoTransform.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ VideoTransform::VideoTransform()
3131
{
3232
}
3333

34+
VideoTransform::~VideoTransform()
35+
{
36+
sws_freeContext( _imageConvertContext );
37+
}
38+
3439
bool VideoTransform::init( const Frame& srcFrame, const Frame& dstFrame )
3540
{
3641
const VideoFrame& src = static_cast<const VideoFrame&>( srcFrame );

src/AvTranscoder/transform/VideoTransform.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class AvExport VideoTransform : public ITransform
1616
{
1717
public:
1818
VideoTransform();
19+
~VideoTransform();
1920

2021
void convert( const Frame& srcFrame, Frame& dstFrame );
2122

0 commit comments

Comments
 (0)