<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 9, 2019 at 12:19 PM Philippe Noël <<a href="mailto:philippe_noel@college.harvard.edu">philippe_noel@college.harvard.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>What is the most efficient/fastest way to send AVpacket frame data (stored in data) through a socket?</div><div><br></div><div>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.</div></div></blockquote><div><br></div><div>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.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>Thanks for your help!</div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Phil<br></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="https://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">https://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br>
To unsubscribe, visit link above, or email<br>
<a href="mailto:libav-user-request@ffmpeg.org" target="_blank">libav-user-request@ffmpeg.org</a> with subject "unsubscribe".</blockquote></div></div>