Change libav IOContext to a custom one and add dummy write_packet