The disclosed techniques compensate for buffer underruns by predicting missing
media content. During playback of a
stream of
media content, a
client device receives data packets. A packet predicting
system (PPS) of the
client device includes two buffers. The first buffer in the packet predicting
system is a buffer that temporarily stores the data packets. The second buffer, also in the PPS, is a buffer that stores copies of the data packets stored in the first buffer. In addition, the PPS predicts a predetermined number of future packets each time new data packets are copied to the second buffer. When a
client application of the client device requests the next packet, the PPS provides the next packet from the first buffer to a buffer located in the client application. However, when the first buffer is empty, the PPS provides a predicted packet from the second buffer to the client application.