[Libav-user] Sending AVpacket data over socket

Philippe Noël philippe_noel at college.harvard.edu
Sun Dec 8 23:35:41 EET 2019


I'm trying to send the "data" field of AVpacket over a socket. When I get
the size field, it tells me about 22,000 (which makes sense), but when I
reference the data field (with packet->data) I only get about 8, which
seems to be only be pointer. How can I access the uint8_t array so I can
send it over my socket?

Here's a code snippet to illustrate:

[image: Screen Shot 2019-12-08 at 16.35.26.png]

Thanks a lot for your help!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20191208/c849f5f8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2019-12-08 at 16.35.26.png
Type: image/png
Size: 70834 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20191208/c849f5f8/attachment.png>

More information about the Libav-user mailing list