I am trying to extract Closed Caption data from SEI message in AVC stream. Hence i used the sample code (simple_decode project), in which i added following snippet after mfxDEC.DecodeFrameAsync to check on SEI data.
dec_payload.NumBit = 100;
mfxStatus mfx_param_flag = mfxDEC.GetPayload(&ts,&dec_payload);
if((mfx_param_flag == MFX_ERR_NONE) && (dec_payload.Type == 4))
Where added variables are :
dec_payload.Data = new mfxU8;
When i check on dec_payload.Data memory by breaking at printf(""); i see different data than that was expected. I am not really sure if there is format issue here.
Although i am getting ATSC Identifier and Country code ,Provider code and user identifier properly such 0xB5, 0x0031, "GA94" etc. But once CC data starts after 0xFF, thats when i see different data . So in a way i am getting starting 12 bytes of each payload, properly. The remaining Actually CC data is mismatch from my reference . And also i am not getting Time stamp which was parameter to this function, as it always returns 0 .
Please let me know if i have done anything wrong or some interpretation problem. Please let me know.
I am attaching bin of dumps from my reference and from sample code with added snippet as shown for your reference.
Please HEX editors or Hex compare using Beyond compare.
CC_ref --> reference
CC_MFX--> MFX output.