lavf: always call avio_flush in av_write_trailer.