Skip to content

Commit ef9b7da

Browse files
committed
Fix memory leaks in VapourSynth
1 parent be760d0 commit ef9b7da

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

wrapper/vs_filter.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ class VSFilter {
150150

151151
void FreeFrame(AFrame* frame) {
152152
_vsapi->freeFrame(frame->_frame);
153+
delete frame;
153154
}
154155
int ssw() const { return vi._vi.format->subSamplingW; }
155156
int ssh() const { return vi._vi.format->subSamplingH; }
@@ -174,6 +175,8 @@ class VSFilter {
174175

175176
const VSFrameRef *VS_CC GetFrame(VSFrameContext *_frameCtx, VSCore *_core, const VSAPI *vsapi, int n) {
176177
auto frame = dynamic_cast<AFrame*>(get(n));
177-
return frame->_frame;
178+
auto _frame = frame->_frame;
179+
delete frame;
180+
return _frame;
178181
}
179182
};

0 commit comments

Comments
 (0)