On Mon, Dec 9, 2019 at 12:19 PM Philippe Noël <
philippe_n...@college.harvard.edu> wrote:

> Hi,
>
> What is the most efficient/fastest way to send AVpacket frame data (stored
> in data) through a socket?
>
> I understand that since it is a byte array, I think I would need to
> memcpy + serialize it, to avoid the 0x00 error. Is there a faster way/way
> to send the byte array directly? I'm interested in the lowest possible
> latency at all cost and I worry serializing will be too slow.
>

Sockets do not interpret the data you send through them using send() or
write(), so there is no "0x00 error". You are probably trying to compute
the length of the frame data using strlen(). Just use the "size" field of
the AVPacket instead; it contains the length of the buffer in bytes.

>
> Thanks for your help!
>
> Phil
> _______________________________________________
> Libav-user mailing list
> Libav-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/libav-user
>
> To unsubscribe, visit link above, or email
> libav-user-requ...@ffmpeg.org with subject "unsubscribe".
_______________________________________________
Libav-user mailing list
Libav-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
libav-user-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to