Hi All
We are inserting SEI payload into our frames :
We are allocating the data before sending the frame for encoding :
NV_ENC_H264_SEI_PAYLOAD* ptz_sei_payload = (NV_ENC_H264_SEI_PAYLOAD*)malloc(sizeof(NV_ENC_H264_SEI_PAYLOAD));
uint8_t* ptz_and_camera_matrix_data = (uint8_t*)malloc(sizeof(H264SeiCameraMatricesInjector::H264SeiCameraMatrices)); // Who is responsible to destroy this after use?
ptz_sei_payload->payloadSize = sizeof(H264SeiCameraMatricesInjector::H264SeiCameraMatrices);
ptz_sei_payload->payloadType = 5; // Refer to Annex D.1 of T-REC-H.264-200305-S!!PDF-E.pdf. Payload type 5 corresponds to Unregistered User Data
ptz_sei_payload->payload = ptz_and_camera_matrix_data;
picParams.codecPicParams.h264PicParams.seiPayloadArray = ptz_sei_payload;
picParams.codecPicParams.h264PicParams.seiPayloadArrayCnt = 1;
The above works just fine but my question is who is responsible for deleting the memory pointed to by picParams.codecPicParams.h264PicParams.seiPayloadArray?
Will Nvenc release the memory once the frames has been encoded or how should this be handled.
Thanks in advance!