<div dir="ltr"><div dir="ltr">read_packet should not return AVERROR(EAGAIN) if it knows that more data will be available but it doesn't have the requested amount (bufferSize) available.<div>Simply return the number of bytes that you copied in any case. Return an AVERROR(something) if there is an actual error.</div></div></div>