Skip to content

Commit

Permalink
Fix big memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
myrsloik committed Apr 25, 2024
1 parent ce53a66 commit 7ad90cd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/descratch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,9 @@ static const VSFrame *VS_CC deScratchGetFrame(int n, int activationReason, void
ProcessPlane(1, d->modeU, d->mindifUV);
ProcessPlane(2, d->modeV, d->mindifUV);

vsapi->freeFrame(src);
vsapi->freeFrame(blured);

return dest;
}

Expand Down Expand Up @@ -673,6 +676,6 @@ static void VS_CC deScratchCreate(const VSMap *in, VSMap *out, void *userData, V
// Init

VS_EXTERNAL_API(void) VapourSynthPluginInit2(VSPlugin *plugin, const VSPLUGINAPI *vspapi) {
vspapi->configPlugin("com.vapoursynth.descratch", "descratch", "DeScratch for Vapoursynth and friends", VS_MAKE_VERSION(1, 0), VAPOURSYNTH_API_VERSION, 0, plugin);
vspapi->configPlugin("com.vapoursynth.descratch", "descratch", "DeScratch for Vapoursynth and friends", VS_MAKE_VERSION(2, 0), VAPOURSYNTH_API_VERSION, 0, plugin);
vspapi->registerFunction("DeScratch", "clip:vnode;mindif:int:opt;asym:int:opt;maxgap:int:opt;maxwidth:int:opt;minlen:int:opt;maxlen:int:opt;maxangle:float:opt;blurlen:int:opt;keep:int:opt;border:int:opt;modey:int:opt;modeu:int:opt;modev:int:opt;mindifuv:int:opt;mark:int:opt;minwidth:int:opt;left:int:opt;right:int:opt;", "clip:vnode;", deScratchCreate, nullptr, plugin);
}

0 comments on commit 7ad90cd

Please sign in to comment.