At present, streaming media service is one of the important application of the information technology. P2P network has played an important role in the distribution of large data flow of streaming media in application. In this paper, we propose a P2P streaming media data allocation algorithm, which is based on the importance degree of data block and buffer delay. It improves the traditional allocation algorithms from the aspect of buffer delay and streaming media data's continuity, using the greed strategy of allocating the data block in priority according to their importance degree. The experimental results show that compared with other similar allocation algorithms, the improved algorithm's buffer delay is lower and the media data can be continued played better.