- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I currently have mfxBitstream *pMfxBitstream that comes out of EncodeFrameAsync
At that point pfxBitstream->data contains data, however after writing that data to a file or copying it somewhere else, I no longer need it
Is setting pMfxBitstream->DataLength = 0; enough as shown by the example? Or should I also free pMfxBitstream->Data if I intent to use it repeatedly and avoid memory leaks? Or would freeing it potentially cause problems?
Thank you.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Matthew,
You do not have to free any mfxBitStream buffers during execution. The samples provided with the Media SDK showcase the correct usage. In essence just allocate sufficient buffer before starting processing then free it after all frames have been completely processed.
Regards,
Petter
![](/skins/images/D2683F18326913BBA0436CB7114DD569/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page