Discussion Forum

 Welcome Guest        

 All Forums
  ViewCast Osprey Products

  

OPI Memory Leak
Message by John Reilly on Thursday, February 13, 2003 at 12:30  
Location: United States   Joined: Friday, February 07, 2003   Posts: 3   Profile Search www Quote

(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


If you wish to post a reply to this thread you must first login
If you are not already registered you must first register to use the forum

 Forum Jump   
� 2001 ViewCast Corporation - All Rights Reserved.