Hello, I think av_get_packet should return an error (AVERROR_EOF) when it read nothing at all due to reaching EOF. I think this will also simplify my attempts to clean up the raw read functions to be more consistent/whatever.