|
(This is a follow up to a previous thread, which has more background on our project.)
We are experiencing a memory leak in our encoding application. We are using the OPI SDK with callbacks to save the data:
... m_pipeline->getOutStream()->setDataReadyCallback(&SaveBuffer, (void*)this); ...
void CALLBACK CEncode::SaveBuffer(OPIBuffer* buffer, void* userData) {
CEncode* encodePtr = (CEncode*) userData; fwrite(buffer->data, 1, buffer->fsize, encodePtr->m_fd); encodePtr->m_pipeline->getOutStream()->returnBuffer(buffer);
}
This source is taken from the example Encode source, which also leaks when it runs. The MPEG VCR app does not leak, but we can't figure out why. Can anyone shed some light on what we could be missing or doing wrong?
Thanks, John Reilly
|