PDA

View Full Version : OMX IL: FreeBuffer always called before ComponentDeInit?



pedwo
09-16-2008, 08:47 AM
Hi,

Can an OMX component assume that the IL client will always call FreeBuffer for all buffers that the component has been told about with UseBuffer or allocated with AllocateBuffer? Specifically, if the component transitions itself into the Invalid state, should it expect the client to call FreeBuffer for all buffers before it calls ComponentDeInit?

Thanks
Phil

rnixon
09-16-2008, 10:00 AM
Can an OMX component assume that the IL client will always call FreeBuffer for all buffers that the component has been told about with UseBuffer or allocated with AllocateBuffer
The spec doesn't look to say anything to the contrary, so the IL client must have freed the buffers.

Specifically, if the component transitions itself into the Invalid state, should it expect the client to call FreeBuffer for all buffers before it calls ComponentDeInit?
Personally, I really don't like the invalid state. I'd be very unhappy with a component that ever transitioned to it.

Basically, all bets are off. The spec says:

The IL client shall stop, de-initialize, unload, and reload the component when the IL client detects an invalid state
Which specifically doesn't mention freeing buffers. (I assume that the stop refers to the IL client, not the component). You may have memory leaks, but the component has already admitted that it's rubbish by entering the invalid state in the first place.

Thanks,

Roger