摘要 |
Embodiments of the present invention disclose a method for buffering streaming media, including: determining whether there is no free buffer chunk to buffering streaming media currently in a playing buffer; if so, stopping downloading streaming media from the network; otherwise, buffering the streaming media downloaded from the network in the playing buffer; determining whether the time for playing the streaming media after being buffered in the playing buffer is later than the time for playing the steaming media according to the playing speed; if so, stopping playing streaming media in the buffer chunk; otherwise, playing streaming media in the buffer chunk. In accordance with the present invention, the problem of covering streaming media not being played in playing buffer and playing streaming media disconnectedly caused by the difference between the speed of downloading and playing streaming media is avoided by respectively controlling the process of downloading and playing streaming media. In view of the above, it is possible to guarantee that no error occurs in the process of buffering and playing streaming media, and ensure the quality for playing streaming media. Embodiments of the present invention further disclose an apparatus for buffering streaming media. |