A non-transitory computer-readable storage medium is provided including instructions that, when executed by a processor, causes the processor to perform a method for recovering lost information in a data stream, comprising:
- receiving the data stream comprising consecutive frames from a server, each frame encoded based on information from preceding frame(s) used as reference, the consecutive frames comprising at least a first frame, a second frame, a third frame, and a fourth frame;
- detecting an error in the second frame of the data stream;
- sending an error message to the server regarding the error;
- receiving a corrected frame after the third frame and the fourth frame, the corrected frame referencing a distant reference frame and disregarding any frames received between the distant reference frame and the corrected frame, the distant reference frame received prior to detection of the error in the second frame, the distant reference frame comprising the first frame, the corrected frame separated from the distant reference frame by at least one frame, wherein the distant reference frame is directly referenced only by the corrected frame after detection of the error and the distant reference frame directly references a clean frame received immediately prior to the first frame;
- decoding the corrected frame based on the distant reference frame;
- receiving an immediately subsequent frame after the corrected frame, the immediately subsequent frame encoded based on the corrected frame;
- and
- receiving a subsequent frame after the immediately subsequent frame, the subsequent frame encoded based on the immediately subsequent frame.