Quantcast
Channel: Intel® Software - Media
Viewing all articles
Browse latest Browse all 2185

mfxEncodeCtrl payload lifetime

$
0
0

Hi,

I'm having some issues inserting SEI payloads while encoding.  Specifically, I'm confused regarding the lifetime of the mfxEncodeCtrl structure and associated payload.  If I allocate the mfxEncodeCtrl and mfxPayload data on the heap and never free either, everything works fine.  If I free just the mfxPayload->Data, it also seems to work.  But if I also free the mfxEncodeCtrl structure or the Payload pointers, then I get a segfault in the codec library.

I thought I saw something in the documentation that said the payload data needs to remain valid for the duration of the async job, which is why I'm waiting until after the SyncOperation completes to free it.  Is that also the case with the rest of the mfxEncodeCtrl struct?

So, I'd like to clarify the following:

- Does the encoder copy the mfxPayload data to some internal storage during EncodeFrameAsync?

- Is it ok to use a new mfxEncodeCtrl structure on each call to EncodeFrameAsync, or should I be reusing the same one and just changing the payload each time?  If this is ok, what is the expected lifetime of the mfxEncodeCtrl object?

I should also mention that I'm pipelining the encoding with an AsyncDepth of 4.

Thanks,

will


Viewing all articles
Browse latest Browse all 2185

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>