forked from bartvdbraak/blender
Fix imbuf users leak in MovieClip tiles node
Leak was caused by not calling IMB_freeImBuf for result of BKE_movieclip_get_ibuf
This commit is contained in:
parent
1ae3929138
commit
d3067dfaa2
@ -30,6 +30,7 @@ extern "C" {
|
||||
#include "DNA_movieclip_types.h"
|
||||
#include "BKE_movieclip.h"
|
||||
#include "BKE_tracking.h"
|
||||
#include "IMB_imbuf.h"
|
||||
}
|
||||
|
||||
MovieClipNode::MovieClipNode(bNode *editorNode): Node(editorNode)
|
||||
@ -118,4 +119,8 @@ void MovieClipNode::convertToOperations(ExecutionSystem *graph, CompositorContex
|
||||
angleMovieClip->relinkConnections(operationSetValue->getOutputSocket());
|
||||
graph->addOperation(operationSetValue);
|
||||
}
|
||||
|
||||
if (ibuf) {
|
||||
IMB_freeImBuf(ibuf);
|
||||
}
|
||||
}
|
||||
|
@ -61,8 +61,12 @@ void MovieClipOperation::initExecution()
|
||||
|
||||
void MovieClipOperation::deinitExecution()
|
||||
{
|
||||
if (this->movieClipBuffer) {
|
||||
IMB_freeImBuf(this->movieClipBuffer);
|
||||
|
||||
this->movieClipBuffer = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void MovieClipOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
|
||||
{
|
||||
@ -76,6 +80,8 @@ void MovieClipOperation::determineResolution(unsigned int resolution[], unsigned
|
||||
if (ibuf) {
|
||||
resolution[0] = ibuf->x;
|
||||
resolution[1] = ibuf->y;
|
||||
|
||||
IMB_freeImBuf(ibuf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user