[Libav-user] av_packet_get_side_data() not working
Nicolas George
george at nsup.org
Tue Jun 23 12:09:53 EEST 2020
rohit khali (12020-06-23):
> I am using av_parser_parse2() to construct one H264 frame.
> av_parser_parse2(parser, c, &pkt->data, &pkt->size,
> data, data_size, AV_NOPTS_VALUE,
> AV_NOPTS_VALUE, 0);
>
> Now, I am trying to use the below code to extract AV_PKT_DATA_A53_CC data.
> However av_packet_get_side_data() is unable to detect the presence of CC
> present in the pkt,
> //Extract side_data
> uint8_t *streaminfo;
> int streaminfo_size;
> /* check for updated streaminfo */
> //
> streaminfo = av_packet_get_side_data(pkt,
> AV_PKT_DATA_A53_CC,
> &streaminfo_size);
> if (streaminfo && streaminfo_size) {
> printf("AV_PKT_DATA_A53_CC found \n");
> }
> At the same time, av_frame_get_side_data(frame, AV_FRAME_DATA_A53_CC) works
> fine.
>
> Any idea, what am I missing in above code?
The side data is not present in the packet, the closed captions are
encoded in the bitstream, it needs to be decoded.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20200623/ada2e24e/attachment.sig>
More information about the Libav-user
mailing list