Nvidia codec sdk 8.2 set mastering_display and content SEI failed

HI
I use Telsa P40 with driver410.93 and codec sdk8.2 in unbuntu 18.04. The ffmpeg version is 4.3.1. When I set 137 and 144 SEI in hevc_nvenc , the output mpegts has no metadata.
the code setting sei data is as follows:
ctx->cuva_sei[0].payloadType = 137;
ctx->cuva_sei[0].payloadSize = 24;
if (ctx->cuva_sei[0].payload == NULL)
{
ctx->cuva_sei[0].payload = (uint8_t*)malloc(sizeof(mastering_display));
}
master_def.display_primaries[0][0] = 13250;
master_def.display_primaries[0][1] = 34500;
master_def.display_primaries[1][0] = 7500;
master_def.display_primaries[1][1] = 3000;
master_def.display_primaries[2][0] = 34000;
master_def.display_primaries[2][1] = 16000;
master_def.white_point[0] = 15635;
master_def.white_point[1] = 16450;
master_def.max_luminance = 10000000;
master_def.min_luminance = 1;
memcpy(ctx->cuva_sei[0].payload, &master_def, sizeof(master_def));
params->codecPicParams.hevcPicParams.seiPayloadArrayCnt = 2;
params->codecPicParams.hevcPicParams.seiPayloadArray = ctx->cuva_sei;